App Composition
Structure larger projects with defineChimpbaseApp.
For larger projects, compose your app in a chimpbase.app.ts file using defineChimpbaseApp:
Run with:
What goes in defineChimpbaseApp
| Option | Purpose |
|---|---|
project.name | Project identifier used for internal table namespacing |
migrations | Database migration definitions for your application tables |
registrations | Array of actions, subscriptions, workers, cron jobs, and workflows |
httpHandler | Optional HTTP handler (e.g. a Hono app) for REST endpoints |
Registrations
All primitives go in a single registrations array. Actions are registered by their export name; subscriptions, workers, and cron jobs are created inline:
Decorator alternative
If you prefer a class-based style, use decorators and collect registrations with registrationsFrom(...):