Skip to content
impulseDOCS
Get Started

Build with Astro

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

Terminal window
npm install postgres
src/lib/db.ts
import postgres from 'postgres';
export const sql = postgres(import.meta.env.DATABASE_URL, { ssl: 'require' });

Static builds can query at build time; SSR (Node adapter) queries per request.

Use the Supabase-compatible client inside interactive islands exactly as in the React guide — publishable values only.

Astro content collections pair naturally with ImpulseSearch: push documents at build time, query client-side with a search-only key.

Static output → ImpulseDrive static hosting or a web hosting plan. SSR with the Node adapter → Cloud VPS.