From 2990452b3bb7a7d01e96a06089c06f5c3b9aaaad Mon Sep 17 00:00:00 2001 From: CentreMetre Date: Sun, 31 May 2026 08:56:33 +0100 Subject: [PATCH] Create some boilerplate code for index webpage. --- index.js | 12 +++++------- public/index.html | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 public/index.html diff --git a/index.js b/index.js index 8e2fd02..049bd27 100644 --- a/index.js +++ b/index.js @@ -1,12 +1,10 @@ import express from 'express'; +import path from 'path'; const app = express(); -const port = 3000; -app.get('/', (req, res) => { - res.send('Server is running'); -}); +app.use(express.static('public')); -app.listen(port, () => { - console.log(`Server running on http://localhost:${port}`); -}); +app.listen(3000); + +console.log("Codelist app running on port 3000") diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..006f233 --- /dev/null +++ b/public/index.html @@ -0,0 +1,14 @@ + + + + + + + HTML 5 Boilerplate + + + +

CodeList

+ + +