Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit 76a2f9305cfd3018885e051881a86a5c64f07567
parent 930e980cefd16e48e2be07a316f545a23b1056e2
Author: Demonstrandum <moi@knutsen.co>
Date:   Wed, 29 Jul 2020 00:01:42 +0100

Hardcode web port.

Diffstat:
Mlib/web.ts | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/web.ts b/lib/web.ts @@ -12,7 +12,8 @@ const templater = (doc, vars): string => { return new_doc; }; -const PORT = Number(process.env.PORT) || 8080; +//const PORT = Number(process.env.PORT) || 8080; +const PORT = 8181; // This value is hardcoded now for the VPS. export default (GLOBAL_CONFIG : Types.GlobalConfig, handle_post) => { const request_listener: http.RequestListener = (req, res) => { @@ -33,7 +34,7 @@ export default (GLOBAL_CONFIG : Types.GlobalConfig, handle_post) => { }); return; } - + const url = req.url; const relative = `./web/${url}`; if (url.endsWith('.png')) { @@ -135,6 +136,6 @@ export default (GLOBAL_CONFIG : Types.GlobalConfig, handle_post) => { }; const server = http.createServer(request_listener); server.listen(PORT, '0.0.0.0', () => { - console.log(`Web server started on http://0.0.0.0:8080/`); + console.log(`Web server started on http://0.0.0.0:${PORT}/`); }); };