We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59af63a commit 0e3ab6eCopy full SHA for 0e3ab6e
examples/cookie-sessions/index.js
@@ -13,13 +13,10 @@ var app = module.exports = express();
13
app.use(cookieSession({ secret: 'manny is cool' }));
14
15
// do something with the session
16
-app.use(count);
17
-
18
-// custom middleware
19
-function count(req, res) {
+app.get('/', function (req, res) {
20
req.session.count = (req.session.count || 0) + 1
21
res.send('viewed ' + req.session.count + ' times\n')
22
-}
+})
23
24
/* istanbul ignore next */
25
if (!module.parent) {
0 commit comments