1.0.0 • Published 6 years ago

redis-express-session v1.0.0

Weekly downloads
4
License
ISC
Repository
-
Last release
6 years ago

Redis Express Session

This library offers a way of keeping a users session in a server-server environment, e.g. a webhooks server.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installing

npm i redis-express-session

API

The API exposes a single function that accepts: |Property name |Type | Required |Description | |--- |--- |--- |---| |Configuration |Object |No |An object that holds the configuration values | |Configuration.host |String |No |Redis server hostname | |Configuration.port |Integer |No |Redis server port | |Configuration.password |String |No |Redis server password | |Configuration.timeoutInSeconds |String |No |Redis session time to live (TTL) | |Configuration.tls |Object |No |A configuration object that will take precedence over any other value present within this configuration object. When specified the library will attempt to initiate a secure connection over TLS with the Redis server specified in its contents | |Configuration.host |String |No |Redis server hostname | |Configuration.password |String |No |Redis server password | |Configuration.port |Integer |No |Redis server port |

After configuring the instance a higher order function is returned that accepts a single string value as its first and only parameter. This function returns another function that adheres to the standard Express middleware format and can be hooked up to any Express server as middleware.

Built With

  • Redis - Node.js client for Redis
  • Bluebird - JavaScript Promise library

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments