Skip to main content

Installation

Requirements

  • Node.js >= 22.0.0
  • Express >= 4.x or Fastify >= 4.x

Install

npm install loadflux

This installs LoadFlux with its default SQLite database. No additional setup is needed.

Optional: MongoDB support

If you prefer MongoDB over SQLite, install the MongoDB driver as a peer dependency:

npm install mongodb

Then configure LoadFlux to use it:

app.use(loadflux({
database: {
adapter: "mongodb",
connectionString: "mongodb://localhost:27017/loadflux",
},
}));

What gets installed

LoadFlux bundles everything it needs:

DependencyPurpose
better-sqlite3Default SQLite database (zero-config)
bcryptjsPassword hashing for authentication
node-cronScheduled data retention cleanup
on-headersResponse timing hooks

The React dashboard UI is pre-built and shipped as static assets — no client-side build step needed.

Next steps