Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const bodyParser = require('body-parser');
- app.use(bodyParser.json());
- app.use(function (req, res, next) {
- res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000');
- res.setHeader('Access-Control-Allow-Origin', '*');
- next();
- });
- const AboutController = require('./controllers/AboutController');
- app.use('/about', AboutController);
- router.post('/store', (req, res, next) => {
- // GETTING REQUEST DETAILS AND INITIALIZATION
- let content = req.body.content;
- let company_name = req.body.company_name;
- console.log(req.body);
- });
- module.exports = router;
Add Comment
Please, Sign In to add comment