Build with Node.js
Create a project (quickstart), open the Connect tab, and copy your .env. Then wire it up:
The full wiring
Section titled “The full wiring”npm install hono @hono/node-server postgres ioredis @aws-sdk/client-s3 joseimport { Hono } from 'hono';import postgres from 'postgres';import Redis from 'ioredis';import { createRemoteJWKSet, jwtVerify } from 'jose';
const sql = postgres(process.env.DATABASE_URL!, { ssl: 'require' });const redis = new Redis(process.env.REDIS_URL!);const jwks = createRemoteJWKSet(new URL(`${process.env.AUTH_URL}/.well-known/jwks.json`));
const app = new Hono();
// Auth middleware — verify ImpulseAuth JWTsapp.use('/api/*', async (c, next) => { const token = c.req.header('Authorization')?.replace('Bearer ', ''); if (!token) return c.text('unauthorized', 401); const { payload } = await jwtVerify(token, jwks); c.set('userId', payload.sub); await next();});
app.get('/api/todos', async (c) => { const cached = await redis.get(`todos:${c.get('userId')}`); if (cached) return c.json(JSON.parse(cached)); const todos = await sql`select * from todos where user_id = ${c.get('userId')}`; await redis.set(`todos:${c.get('userId')}`, JSON.stringify(todos), 'EX', 30); return c.json(todos);});Background work
Section titled “Background work”Publish jobs to ImpulseMessaging and consume them in a worker process — same .env, second systemd unit.
Host it on Impulse
Section titled “Host it on Impulse”A Cloud VPS with systemd + Nginx is the natural home: node server.js under a unit file, TLS at the proxy. Deploy with git pull or rsync from CI.