@wervt/nitro
v0.0.4
Published
Nitro module for apps hosted on wervt: Deno build for the runtime, tasks, local database and the bundle manifest.
Readme
@wervt/nitro
Nitro 3 module for apps on wervt.
import { defineConfig } from 'nitro'
import { wervt } from '@wervt/nitro'
export default defineConfig({
preset: 'deno-server',
modules: [wervt({ timezone: 'Europe/Berlin' })],
})Add rolldown to devDependencies too: Nitro doesn't install its builder during a CI build.
- Builds for wervt's runtime (Supabase Edge Runtime, Deno):
node:built-ins, Node globals, JSDoc import paths. - Serves
/_wervt/tasks(the app'stasks/), the boot check and/_wervt/user. - Hands
scheduledTasksto the control plane, which runs them while the app sleeps. nitro devcreates the app's role and schema in the local stack, runsdrizzle/migrations and setsDATABASE_URLandELECTRIC_URL.- Writes the bundle manifest (
framework: nitro).
Use @wervt/core in routes: getUser(event.req),
proxyShape(event.req, …), sendMail(), useDb() from @wervt/core/db. Nuxt apps use
@wervt/nuxt instead.
