Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const express = require('express');
  2. const app = express();
  3. const port = 3000;
  4.  
  5.  
  6. app.use(express.json());
  7.  
  8. app.use(function (req, res, next) {
  9.     console.log(req.url, req.body);
  10.     res.json({"success": "OK"});
  11. });
  12.  
  13.  
  14.  
  15. app.listen(port, () => console.log(`Example app listening on port ${port}!`));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement