1const express = require('express');
2const bodyParser = require('body-parser');
3
4const app = express();
5app.use(bodyParser.urlencoded({ extended: true }));
6
7app.post('/post-test', (req, res) => {
8 console.log('Got body:', req.body);
9 res.sendStatus(200);
10});
11
12app.listen(8080, () => console.log(`Started server at http://localhost:8080!`));