PHP Sessions Express
This is simple Express/Connect middleware that loads PHP sessions in an express request.
Module returns a session object. If the session file is empty a req.session is set to undefined.
Original code created by: inxilpro https://github.com/inxilpro/php-session-middleware !
PR's are more than welcome
Installation
$ npm install php-sessions-express --save
Usage
app;app;
Usage with a controller
exports {var session = reqsession;// do something with session object};
Initial release
- This is the initial release, with minimal testing. Use at your own risk. But I'll be updating as much as I can.
Running tests
- Run tests/specs from module root folder with: ```npm test```
Roadmap
- Change to Jasmine Testing Framework
- Extend Test cases (testing for a empty session file, ...)
- Implementing serialize() function
Ideas
And I'll be adding new ideas as I go along. <h2>Suggestions are welcome!!!</h2>
CHANGES
- 0.0.6 : Added changes for AJAX POST requests to be read
NOTE: add sidName to configuration object sent to the module and match the key with the key name that is sent in AJAX data object