Skip to content

jpillora/p2p-session-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P2P Session Store

A simple peer-to-peer session store for connect and express

Installation

npm install p2p-session-store

Usage

In Express:

app.use(express.session({
  store: new P2PSessionStore({
    port: 7001,
    peers: [8001, 9001]
  }),
  secret: 'secret'
}));

This will create a dnode TCP server, listening for session data on 7001 and will send session data to 8001 and 9001

API

new P2PSessionStore(options)

Creates a new instance

options

Todo...

Issues

dnode depends on node-gyp, so in order to npm install on Windows, you'll need to follow the node-gyp Installation guide. Unix and Mac requires python and make so it should just work.

Quick windows links:

Credits

Most of the work is being done by substack's dnode

About

Peer-to-Peer Sesssion Store for Connect and Express

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published