Express middleware for wrapping res.cookie to use some sane defaults for the cookie config.
// Assuming the host is 'foo.bar.com'var express = ;var cookieDomain = ;var app = ;app; /* * You can also pass global overrides into cookieDomain * app.use(cookieDomain({ maxAge: 86400 }); */ app;
Installation and Environment Setup
Install node.js (See download and install instructions here: http://nodejs.org/).
Clone this repository
> git clone git@github.com:mantacode/node-cookie-domain.git
cd into the directory and install the dependencies
> cd cookie-domain
> npm install && npm shrinkwrap --dev
Running Tests
Install coffee-script
> npm install coffee-script -g
Tests are run using grunt. You must first globally install the grunt-cli with npm.
> sudo npm install -g grunt-cli
Unit Tests
To run the tests, just run grunt
> grunt spec