From 8632c73d1dadc3fba9b05de2a0db390aa3182784 Mon Sep 17 00:00:00 2001 From: lucaspalomodevelop Date: Wed, 2 Mar 2022 18:55:07 +0100 Subject: [PATCH] add start-script | cleanup --- package.json | 3 ++- src/index.js | 2 -- src/websrv/index.js | 7 ------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index bee2020..f35a34d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "main": "index.js", "license": "MIT", "scripts": { - "test": "mocha ./test/index.js" + "test": "mocha ./test/index.js", + "start":"node ./src/index.js" }, "dependencies": { "body-parser": "^1.19.2", diff --git a/src/index.js b/src/index.js index d7b381c..6571cb5 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,6 @@ let conf = require("./helper/conf")(); -// let jsste = require("./jsste")(conf); let websrv = require("./websrv")(conf); -// console.log("jssteconfig", conf); websrv.slisten((host, port) => { console.log("Server started on http://" + host + ":" + port); diff --git a/src/websrv/index.js b/src/websrv/index.js index d804d89..fd9e2c9 100644 --- a/src/websrv/index.js +++ b/src/websrv/index.js @@ -12,13 +12,6 @@ module.exports = function (conf) { app.use(cookieParser()); app.use("/internal", internalRouter); - // app.get("/config", (req, res) => { - // // let files = []; - // // fs.readdirSync(conf.jsste.paths.files).forEach((file) => { - // // files.push(file); - // // }); - // res.json(conf); - // }); app.slisten = function (cb) {