1const express = require('express');
2const bodyParser = require('body-parser');
3
4const app = express();
5
6app.use(bodyParser.json());
7app.use(bodyParser.urlencoded({ extended: true }));
8
9app.use(express.static('public'));
10
11app.get('/', (req, res) => {
12 res.send('Hello Express app');
13});
14
15app.listen(3000, () => console.log('server started'));