Create some boilerplate code for index webpage.
This commit is contained in:
12
index.js
12
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")
|
||||
|
||||
Reference in New Issue
Block a user