MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / buildSslConfig

Function buildSslConfig

apps/api/src/clients/postgres/index.ts:7–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { buildPostgresSsl } from "../../lib/postgres/connection";
6import * as schema from "./schema";
7
8const client = postgres(env.DATABASE_URL, {
9 max: env.DATABASE_POOL_SIZE,
10 idle_timeout: 20,
11 connect_timeout: env.isTest ? 1 : 10,
12 max_lifetime: 60 * 30,
13 prepare: true,
14 ssl: buildPostgresSsl({
15 isProduction: env.isProduction,
16 rejectUnauthorized: env.DATABASE_SSL_REJECT_UNAUTHORIZED,
17 ca: env.DATABASE_SSL_CA,
18 }),
19 onnotice: (notice) => {
20 if (!env.isDevelopment) {
21 return;

Callers 1

index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected