An experiment on deploying remote functions that run inside Postgres using v8, run React SSR, and are easily defined in a rpc/
directory.
export default function helloWorld () => {
const [{version}] = sql`SELECT version()`; // no `await` needed!
return <h1>Hello from <em>inside</em> Postgres: {version}</h1>;
}
Check out the demos & how it works.
- Make sure the Vercel project is connected to a Vercel Postgres (Neon) database.
- Deploy!
- Run
vc env pull
to get a.env.local
file with thePOSTGRES_URL
credential - Run
pnpm dev
to start developing
- MIT licensed
- Elephant icon by Lima Studio (CC Attribution)
- Pokeball icon by Tiny Brand Icons (MIT)