Create some boilerplate code for index webpage.

This commit is contained in:
CentreMetre
2026-05-31 08:56:33 +01:00
parent b270924248
commit 2990452b3b
2 changed files with 19 additions and 7 deletions

View File

@@ -1,12 +1,10 @@
import express from 'express'; import express from 'express';
import path from 'path';
const app = express(); const app = express();
const port = 3000;
app.get('/', (req, res) => { app.use(express.static('public'));
res.send('Server is running');
});
app.listen(port, () => { app.listen(3000);
console.log(`Server running on http://localhost:${port}`);
}); console.log("Codelist app running on port 3000")

14
public/index.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HTML 5 Boilerplate</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>CodeList</h1>
<script src="index.js"></script>
</body>
</html>