redis-server with the FalkorDB module and returns a connected FalkorDB client. It is ideal for local development, demos, CI jobs, or small apps that want a zero-config graph database that starts and stops with the application.
Requirements
- Node.js 20 or later
- Ability to download the FalkorDB module during
npm install - Linux x64 and macOS arm64 are supported; Windows users should run under WSL2 or use a remote server
Installation
Quick start
Persist data between runs
Provide a path to keep data on disk. When set, FalkorDBLite enables periodic snapshots automatically.Work with multiple graphs
Use separate graph IDs to isolate datasets within the same embedded instance.Configuration options
Set options onFalkorDB.open() to control the embedded server:
The FalkorDB client returned by
selectGraph() exposes the full FalkorDB Graph API (query, roQuery, indexes, constraints, profiling, etc.).
Migrate to a remote FalkorDB server
Keep your graph logic and swap only the connection line:Resources
Frequently Asked Questions
What Node.js version does FalkorDBLite for TypeScript require?
What Node.js version does FalkorDBLite for TypeScript require?
FalkorDBLite for TypeScript requires Node.js 20 or later. It supports Linux x64 and macOS arm64. Windows users should run under WSL2.
How do I enable data persistence in FalkorDBLite TypeScript?
How do I enable data persistence in FalkorDBLite TypeScript?
Pass a
path option to FalkorDB.open(): const db = await FalkorDB.open({ path: './my-data' }). This enables periodic snapshots and data persists between application restarts.Can I control memory usage of the embedded server?
Can I control memory usage of the embedded server?
Yes. Use the
maxMemory option: FalkorDB.open({ maxMemory: '256mb' }). This sets the Redis maxmemory configuration for the embedded instance.How do I migrate from FalkorDBLite to a remote FalkorDB server?
How do I migrate from FalkorDBLite to a remote FalkorDB server?
Swap the import and connection line. Change from
import { FalkorDB } from 'falkordblite' with FalkorDB.open() to import { FalkorDB } from 'falkordb' with FalkorDB.connect({ socket: { host, port } }).What happens if the FalkorDB module fails to download during npm install?
What happens if the FalkorDB module fails to download during npm install?
Check your network connectivity and ensure the target platform is supported (Linux x64 or macOS arm64). You can also provide a custom module path via the
modulePath option.