Skip to content

Instantly share code, notes, and snippets.

@bjdixon
bjdixon / app.js
Created August 30, 2014 01:38 — forked from tj/app.js
cookie based sessions using express
var express = require('express')
, cookieSessions = require('./cookie-sessions');
var app = express();
app.use(express.cookieParser('manny is cool'));
app.use(cookieSessions('sid'));
app.get('/', function(req, res){
req.session.count = req.session.count || 0;