@nitra/file-link
v3.1.0
Published
file-link helper
Readme
@nitra/file-link
file-link Redis Integration
This project provides a simple setup for using the file-link library with Redis or an in-memory store, depending on the environment (production or local development).
Features
- Redis as a store: In production, the store uses Redis for caching or storing data.
- In-memory store: In local development, it can default to an in-memory store if Redis is not available.
- Environment variable checks: The project uses
@nitra/check-envto ensure necessary environment variables are defined. - Error handling: Any connection errors are logged using an event listener.
Requirements
- Node.js
- Redis (for production)
Installation
To install the library, run:
bun add @nitra/file-link
# or
npm install @nitra/file-linkConfiguration
Set the Redis connection string and namespace in the environment variables:
REDIS_CONN=redis://user:password@localhost:6379
file-link_NAMESPACE=your-namespace