Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const express = require('express');
- const app = express();
- const port = 3000;
- const bodyParser = require('body-parser');
- app.use(bodyParser.json());
- app.use(bodyParser.urlencoded({
- extended: true
- }));
- app.listen(port);
- router.get('/', (req, res) => {
- req.session = true;
- })
- router.get('/session-in', (req, res) => {
- song = 'be bop a lula';
- res.sendStatus(200) ;
- })
- router.get('/session-out', (req, res) => {
- res.send(song) ;
- })
Add Comment
Please, Sign In to add comment