From f4d18fbf79bac1ecf5177a19f6cf1104f81f87ae Mon Sep 17 00:00:00 2001 From: CBenni Date: Sun, 7 Jan 2018 23:00:58 +0100 Subject: [PATCH] Added configurable port --- config.default.json | 3 +++ index.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.default.json b/config.default.json index b1f45a9..fe5335c 100644 --- a/config.default.json +++ b/config.default.json @@ -1,4 +1,7 @@ { + "http": { + "port": 3002 + }, "discord": { "token": "", "client_id": "" diff --git a/index.js b/index.js index e9dabed..747ea98 100644 --- a/index.js +++ b/index.js @@ -148,8 +148,8 @@ app.get('/:templateName/', async (req, res) => { } }); -app.listen(3002, () => { - console.log('Beebot app listening on port 3002!'); +app.listen(config.http.port, () => { + console.log(`Beebot app listening on port ${config.http.port}!`); });