import express from 'express';
const port = process.env.PORT || 3000;
const app = express();
const myLogger = (req, res, next) => {
console.log('LOGGED', new Date());
};
app.use(myLogger); // application level middleware
app.get('/', (req, res) => {
res.send('Hello World!z');
});
app.get('/stories', (req, res) => {
res.send('Hello World!123');
});
app.listen(port);