git ssb

0+

cel-desktop / ssb-pkg



Tree: d456a6cc8589489e558e6164750474ed2cfc961e

Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-79-npm / cookie-parser / cookie-parser.js

301 bytesRaw
1'use strict';
2
3var cookieParser = require('cookie-parser');
4var req = { headers: { cookie: 'MyCookie=Hello' } };
5var res = {};
6
7var middleware = cookieParser();
8
9middleware(req, res, function () {
10 if (req.cookies) {
11 if (req.cookies.MyCookie === 'Hello') {
12 console.log('ok');
13 }
14 }
15});
16

Built with git-ssb-web