git ssb

0+

cel-desktop / ssb-pkg



Tree: 8f4b43a09aab9801bf28987edd59c2e366180327

Files: 8f4b43a09aab9801bf28987edd59c2e366180327 / 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