Skip to content
impulseDOCS
Get Started

Build with Nuxt

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

Terminal window
npm install postgres
server/utils/db.ts
import postgres from 'postgres';
export const sql = postgres(process.env.DATABASE_URL!, { ssl: 'require' });
server/api/posts.get.ts
export default defineEventHandler(async () => {
return await sql`select id, title from posts order by id desc`;
});

Client plugin with the Supabase-compatible SDK (publishable values via runtimeConfig.public); protect server routes by verifying JWTs against JWKS — details.

import Redis from 'ioredis';
export const redis = new Redis(process.env.REDIS_URL!);

Session caching and rate limiting patterns: Cache.

Nitro’s Node preset on a Cloud VPS; nuxi generate static output on ImpulseDrive static hosting.