Guest User

Untitled

a guest
Dec 16th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. const express = require('express');
  2.  
  3. const app = express();
  4.  
  5.  
  6. app.use('/user', (req, res, next) => {
  7. console.log('In user middleware ');
  8. res.send('<h1>Hello from User page</h1>');
  9. });
  10.  
  11. app.use('/', (req, res, next) => {
  12. console.log('In slash middleware !');
  13. res.send('<h1>Hello from Express !</h1>');
  14. });
  15.  
  16. app.disable('etag');
  17. app.listen(3000);
Add Comment
Please, Sign In to add comment