lortabac
lortabac

Reputation: 599

How to use sessions in Locomotive.js

I am giving a look at the node.js web framework Locomotive. Since it is built on top of Express, I suppose Connect middleware should be easily accessible, but I can't find out how.

I added 2 lines to config/environments/all.js:

this.use(express.cookieParser());
this.use(express.session({ secret: 'keyboard cat'}));

Where is the session object now?

Upvotes: 1

Views: 852

Answers (1)

lortabac
lortabac

Reputation: 599

I found out by myself. It was quite easy:

var express = require('express');
var sess = express.session;

Upvotes: 4

Related Questions