Skip to content

Deployment

MountSQLI is a normal Node library. Deploy it like any TypeScript backend.

Terminal window
pnpm build # your app
pnpm start # node dist/server.js

Use the Postgres or MySQL driver in production to avoid the Node ≥ 22.5 requirement of the zero-dep SQLite driver (or run Node 22.5+).

FROM node:22-alpine
WORKDIR /app
COPY . .
RUN corepack enable && pnpm install --frozen-lockfile && pnpm build
CMD ["node", "dist/server.js"]

Keep secrets in the environment, not in code:

const db = mountsqli({
driver: "postgres",
url: process.env.DATABASE_URL!,
tables: [users],
});

Run migrations as a deploy step:

Terminal window
mountsqli migrate apply

Don’t expose mountsqli dev / Studio to the public internet. Serve your API with a real server; keep Studio for local use.

  • Apply migrations in CI/deploy before starting the app.
  • Use PgTokenStore / createPgAdapter for sessions in production.
  • Inject a shared RateLimiter (Redis) for multi-instance login protection.
  • Deploying with the SQLite :memory: driver (data lost on restart).
  • Exposing Studio publicly.