SlintORM
Docsnpm

Installation

SlintORM has zero runtime dependencies. Install the core package, then add only the driver you need.

Core package

npm install slintorm

Driver peer dependencies

All database drivers are optional peerDependencies. Install only what matches your database.

Packagedriver valueWhen to useMode
better-sqlite3"sqlite"Local dev, desktop, CI — fastestSync (wrapped async)
sqlite3 + sqlite"sqlite"Async SQLite fallbackAsync
pg"postgres"PostgreSQL, Neon, Supabase, RDSAsync
mysql2"mysql"MySQL, PlanetScale, TiDBAsync
mongodb"mongodb"MongoDB Atlas / self-hostedAsync

SQLite

# Recommended (synchronous, WAL mode, fastest)
npm install better-sqlite3
npm install -D @types/better-sqlite3

# Alternative (async, broader env support)
npm install sqlite3 sqlite

PostgreSQL

npm install pg
npm install -D @types/pg

MySQL

npm install mysql2

MongoDB

npm install mongodb

Next.js / Turbopack

Native SQLite bindings must be excluded from bundling. Add serverExternalPackages to your config:

next.config.ts
// next.config.ts
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
  serverExternalPackages: ['better-sqlite3', 'sqlite3'],
};

export default nextConfig;
Edge runtimes

For Cloudflare Workers, Deno Deploy, and Next.js Edge routes, import from slintorm/browserand pass a pre-built schema JSON. Native drivers are not available in V8 isolates. See the Edge guide.

PreviousIntroductionNextConfiguration