Guest User

Untitled

a guest
Jun 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. const bodyParser = require('body-parser');
  2. app.use(bodyParser.json());
  3. app.use(function (req, res, next) {
  4. res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000');
  5. res.setHeader('Access-Control-Allow-Origin', '*');
  6. next();
  7. });
  8.  
  9. const AboutController = require('./controllers/AboutController');
  10. app.use('/about', AboutController);
  11.  
  12. router.post('/store', (req, res, next) => {
  13. // GETTING REQUEST DETAILS AND INITIALIZATION
  14. let content = req.body.content;
  15. let company_name = req.body.company_name;
  16. console.log(req.body);
  17. });
  18. module.exports = router;
Add Comment
Please, Sign In to add comment