From 04bf2c46b51386d14397aa83ad205f996b30126c Mon Sep 17 00:00:00 2001 From: Killer Boss Original <73131550+killerbossoriginal@users.noreply.github.com> Date: Wed, 11 Jan 2023 20:05:47 +0000 Subject: [PATCH] Test --- cm.js | 2 +- index.js | 33 +-------------------------------- src/webserver.js | 2 +- 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/cm.js b/cm.js index 4c34a57..3b9a4e3 100644 --- a/cm.js +++ b/cm.js @@ -1,3 +1,3 @@ module.exports = { - '0': 'HelloWorld' + 'cc': 'helloworld' } \ No newline at end of file diff --git a/index.js b/index.js index 52deb71..d4e654c 100644 --- a/index.js +++ b/index.js @@ -1,32 +1 @@ -var colors = require('colors'); -var readlineSync = require('readline-sync'); -var server = require('./src/server.js'); -server('gui') - -class mitdb { - /** - * @constructor - * @param type This can be 'client' or 'server' - * @param link If type = client, this is the server address (with the port), if type = server, this is the port - * @example (client) http://0.0.0.0:12934 - * @example (server) 12934 - */ - - constructor (type, link) { - this.type = type; - this.link = link; - if (type == 'client') { - - } else if (type == 'server') { - server('api') - } else { - throw new Error('Type is required') - } - } - server -} - -module.export = mitdb -/* -{} -*/ \ No newline at end of file +require('./src/webserver')() \ No newline at end of file diff --git a/src/webserver.js b/src/webserver.js index 485d60d..2762b8d 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -9,7 +9,7 @@ module.exports = (port) => { app.get('/:command/:makewhat/:id/:token', function (req, res) { if (eval('cm.'+req.params.id) != req.params.token) return res.send('{ "Error"= "Invalid token or id" }') - else console.log(req.params.command, req.params.makewhat) + else console.log(req.params.command, req.params.makewhat, req.body) }) app.listen(openOn)