From bd3dd6b96446d7a2048cf9b83c4a0f26079798bf Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 5 Jun 2021 14:12:34 +0100 Subject: [PATCH] Adds initializing screen --- public/default.html | 128 ++++++++++++++++++++++++++++++++++++++++++++ server.js | 7 +++ 2 files changed, 135 insertions(+) create mode 100644 public/default.html diff --git a/public/default.html b/public/default.html new file mode 100644 index 00000000..b42dba7a --- /dev/null +++ b/public/default.html @@ -0,0 +1,128 @@ + + + + + Dashy + + + + + + + + + + + + + + + + + + + + + + Dashy + Dashy + +
+

Initializing

+ + + + + + +
+ + + + + + + \ No newline at end of file diff --git a/server.js b/server.js index 542a0ba6..bc9872ec 100644 --- a/server.js +++ b/server.js @@ -56,9 +56,16 @@ const overComplicatedMessage = (ip, port) => { return msg; } +function send404(req, res) { + // send your 404 here + res.statusCode = 404 + res.end('nothing here!') +} + try { connect() .use(serveStatic(`${__dirname}/dist`)) + .use(serveStatic(`${__dirname}/public`, { index: 'default.html' })) .listen(port, () => { try { printWelcomeMessage(port); } catch (e) { console.log('Dashy is Starting...'); }