1 import express from 'express';
2
3 const app = express();
4 const PORT = 3000;
5
6 // middleware that runs on every request
7 app.use((req, res, next) => {
8 console.log('a]request came in');
9 next();
10 });
11
12 app.get('/', (req, res) => {
13 res.send('Hello Wrold!');
14 });
15
16 app.listen(PORT, () => {
17 console.log(`Server on ${PORT}`);
18 });▋ Message...