git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-79-npm / express-session / express-session.js

414 bytesRaw
1'use strict';
2
3var session = require('express-session');
4var req = { url: '/', headers: { } };
5var res = {};
6
7function genuuid () {
8 return 'SESSIONID';
9}
10
11var middleware = session({
12 genid: function () {
13 return genuuid();
14 },
15 resave: false,
16 saveUninitialized: false,
17 secret: 'keyboard cat'
18});
19
20middleware(req, res, function () {
21 if (req.sessionID === 'SESSIONID') {
22 console.log('ok');
23 }
24});
25

Built with git-ssb-web