Adds initializing screen

This commit is contained in:
Alicia Sykes
2021-06-05 14:12:34 +01:00
parent 10cc57afa0
commit bd3dd6b964
2 changed files with 135 additions and 0 deletions

View File

@@ -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...'); }