Node.js - sql.connectionString()

Returns the connection string for a SQL database at runtime.

import { sql } from '@nitric/sdk'
const db = sql('my-data')
// Should be called at runtime, such as in a service handler
const connStr = await db.connectionString()

Examples

Return a connection string

import { sql } from '@nitric/sdk'
const db = sql('my-data')
// Should be called at runtime, such as in a service handler
const connStr = await db.connectionString()

Connect with Prisma

Connect with Drizzle

Last updated on Oct 17, 2024