Naughty Platypus Memorabilia
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    now-sessionspublic

    NowJS Connect HTTP Session Injection

    To enable:

    var nowjs = require('now'); require('now-sessions')(nowjs);

    To activate, when you're ready:

    nowjs.sessions( sessionStore, sessionKey );

    For example:

    
    // Session Store
    var MemoryStore = require('express/node_modules/connect/lib/middleware/session').MemoryStore;
    app.SessionStore = new MemoryStore({ reapInterval: 60000 * 10 });
    
    nowjs.sessions(app.SessionStore);
    

    Parameters are:

    • the Connect-compliant SessionStore you are using (really the session store just needs to support the .get() method)
    • the connect session key you are using to store the session id in the user's cookie, default is 'connect.sid' if you omit this parameter

    Keywords

    none

    install

    npm i now-sessions

    Downloadsweekly downloads

    2

    version

    0.0.1

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar