Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scott2449 committed Jul 6, 2011
1 parent b5341ed commit 772069d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ You have a complete example on `example/index.js`.

var connect = require('connect')
var sessionStore = require("connect-mongoose")(express);
var http = require('http');

var server = express.createServer(express.cookieParser(), express.session({
secret : "secret",
store : new sessionStore()
}));
mongoose.connection.on("open", function() {
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
response.write(req.session); //this is your session object
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
});
mongoose.connect("mongodb://localhost/dev");

## Tests

Expand Down

0 comments on commit 772069d

Please sign in to comment.