Wire your database client and close scripts cleanly.
Configures a typed Prisma Next database client with middleware, environment-specific connections, transactions, and script teardown.
When to use it
Use when setting up db.ts, adding middleware, configuring environments, switching database targets, using transactions, or fixing script teardown.
Give it a database runtime setup or lifecycle task in your project; it configures db.ts and the relevant application or script code.
What you provide
The runtime examples use Node's ESM JSON imports, which require the JSON import attribute.
For URL-based connections, the runtime reads DATABASE_URL from process.env when db.ts loads; local configuration keeps it in .env.
Enables telemetry middleware; it is a separate package that must be installed directly.
This skill
@prisma-next/middleware-telemetry
Installs telemetry middleware