Skip to content
impulseDOCS
Get Started

Build with SvelteKit

Create a project (quickstart), open the Connect tab, and copy your .env. Then wire it up:

Terminal window
npm install postgres
src/lib/server/db.ts
import postgres from 'postgres';
import { DATABASE_URL } from '$env/static/private';
export const sql = postgres(DATABASE_URL, { ssl: 'require' });
+page.server.ts
import { sql } from '$lib/server/db';
export async function load() {
return { posts: await sql`select id, title from posts order by id desc` };
}

Browser: Supabase-compatible client with the publishable values (PUBLIC_AUTH_URL, PUBLIC_AUTH_ANON_KEY). Server hooks: verify the JWT against your JWKS — Auth → Integrating.

Same patterns as Node.js — keep credentials in $env/static/private.

adapter-node build runs cleanly on a Cloud VPS; adapter-static sites serve from ImpulseDrive static hosting.