php-session-middleware
v0.0.3
Published
Express/Connect Middleware to load PHP session data
Downloads
9
Maintainers
Readme
PHP Session Middleware
This is simple Express/Connect middleware that loads PHP sessions in an express request.
Installation
$ npm install php-session-middleware --save
Usage
var PhpSessionMiddleware = require('php-session-middleware');
app.use(new PhpSessionMiddleware({
handler: 'file',
opts: {
path: '/tmp/'
}
}));
app.get('/restricted', function(req, res) {
if (req.session && req.session.user_id) {
// Do something with session
}
});
Roadmap
- Optionally parse
php.ini
for configuration - Allow for other session handlers, such as memcached
- Implement many more tests
Change Log
Initial release
- This is the initial release, with minimal testing. Use at your own risk.