Registry / database / rest-sessions

rest-sessions

JSON →
library2.0.1jsnpmunverified

REST-Sessions v2.0.1 is a REST interface built on top of redis-sessions for managing and sharing sessions across different app server platforms. It provides CRUD operations for session creation, retrieval, updating, and deletion via HTTP endpoints. The package communicates with Redis to store session data and supports configurable TTL, IP tracking, read/write counters, idle time, and JSON payloads for additional session parameters. It is designed for multi-platform environments (Node.js, PHP, ColdFusion, ASP, .NET) and can be run as a standalone service or via Docker. Maintenance status is unclear; the last release was in 2020 and development appears inactive.

npm install rest-sessions
INSTALL
IMPORT
SIG · REST-SESSIONS
R
rest-sessions
databasejavascriptv2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

server
npm install -g rest-sessions
REST-Sessions is a CLI tool, not a library. It is installed globally and run as a service.

This shows how to install and run REST-Sessions globally, configuring Redis and port via environment variables.

npm install -g rest-sessions # Set environment variables RS_PORT=3000 RS_REDISHOST=localhost RS_REDISPORT=6379 RS_NAMESPACE=drs RS_LOGLEVEL=dev rest-sessions
Debug
Known issues
gotchaThe package uses a global installation (npm -g) and runs as a standalone HTTP service. It is not a module you require in code.
fix
Use as a CLI tool: `rest-sessions` command after global install.
affects: >=2.0.0
breakingNode.js version must be > 10 (engines field). Older Node.js versions will not work.
fix
Upgrade Node.js to v10 or later.
affects: 2.0.0
gotchaThe repository URL in npm metadata (ssh://git@github.com/smrchy/rest-sessions) may not be accessible if not using SSH. Use HTTPS instead: https://github.com/smrchy/rest-sessions.git
fix
Use `git clone https://github.com/smrchy/rest-sessions.git` or update your git config.
affects: >=1.0.0
deprecatedThe package has not been updated since 2020. It may rely on outdated dependencies (e.g., older versions of redis-sessions, express).
fix
Consider forking or migrating to a more actively maintained session management solution.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rest-sessions'
The package is not a module; it is a CLI tool meant to be installed globally.
fix
`npm install -g rest-sessions` and then run the `rest-sessions` command.
ECONNREFUSED connection to Redis
Redis server is not running or unreachable at the configured host/port.
fix
Ensure Redis is running on the host and port specified by RS_REDISHOST and RS_REDISPORT.
SyntaxError: Unexpected token '...'
Using a Node.js version below 10 that does not support modern JavaScript features used by the package.
fix
Upgrade Node.js to version 10 or higher.
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
redis-sessionsrequiredCore dependency for session management using Redis
expressrequiredUsed for HTTP server and routing
redisrequiredRedis client required for session storage
Agent activity
15 hits · last 30 days
node
14
Amazon
1
Resources
rest-sessions — npm install rest-sessions · libregistry