Fastify plugin for SQLite integration, providing typed database access using node-sqlite3 and node-sqlite. v5.0.2 supports Fastify v5; Fastify v4 compatible branch available. Features configurable driver settings (verbose, cached, tracing), in-memory/disk databases, and multiple mode flags. Ships TypeScript types. Released under MIT license.
npm install fastify-sqlite-typedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic registration with in-memory SQLite database and a route querying all users.
For Fastify v4, install the package from the Fastify-V4.x.x branch (e.g., `npm install yoav0gal/fastify-sqlite-typed#Fastify-V4.x.x`).
Import `fpSqlitePlugin` instead of `sqlitePlugin` unless you understand Fastify encapsulation.
Set `dbFilename` to ':memory:' or a non-empty path.
Use numeric values for now; check changelog on upgrade.
Run `npm install fastify-sqlite-typed` and use `import { fpSqlitePlugin } from 'fastify-sqlite-typed'`.Use `fpSqlitePlugin` import and ensure plugin registration occurs before route definitions.
Ensure `app.register(fpSqlitePlugin, ...)` is called and routes are async with proper await on db methods.