Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express');
- const app = express();
- app.use('/user', (req, res, next) => {
- console.log('In user middleware ');
- res.send('<h1>Hello from User page</h1>');
- });
- app.use('/', (req, res, next) => {
- console.log('In slash middleware !');
- res.send('<h1>Hello from Express !</h1>');
- });
- app.disable('etag');
- app.listen(3000);
Add Comment
Please, Sign In to add comment