2023.01.26
This commit is contained in:
parent
04bf2c46b5
commit
8a92e1955e
3 changed files with 1 additions and 18 deletions
1
index.js
1
index.js
|
@ -1 +0,0 @@
|
|||
require('./src/webserver')()
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@thundernetworkrad/mit.db",
|
||||
"version": "2023.01.11",
|
||||
"version": "2023.01.26",
|
||||
"description": "An online server for quickmap.db",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
module.exports = (port) => {
|
||||
var defaultConfig = require('../config.js');
|
||||
var cm = require('../cm')
|
||||
|
||||
var openOn = port || defaultConfig.port || 4000;
|
||||
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
|
||||
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, req.body)
|
||||
})
|
||||
|
||||
app.listen(openOn)
|
||||
}
|
Loading…
Reference in a new issue