git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / 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