Example Library
Aerostack provides a set of high-fidelity, production-ready templates. You can use these as a starting point for your own applications or explore them to learn best practices.
REST APIs
| Template | Database | Description | CLI Command |
|---|---|---|---|
| api | D1 | Classic Hono-based REST API. | aerostack init --template=api |
| api-neon | Neon | Hono-based REST API with PostgreSQL. | aerostack init --template=api-neon |
| express | D1 | Express.js on Workers (Node.js compat). | aerostack init --template=express |
| express-neon | Neon | Express.js with PostgreSQL. | aerostack init --template=express-neon |
Advanced Architectures
Multi-Function Project
Demonstrates a “monorepo-lite” structure with code sharing via a shared/ folder.
- Features: Shared utilities, RPC communication, multiple Workers.
- Try it:
aerostack init --template=multi-func
Scheduled Tasks (Cron)
A pre-configured template for running background jobs on a schedule.
- Features:
scheduledhandler, Neon DB logging. - Try it:
aerostack init --template=cron-neon
Webhook Processor
Optimized for high-throughput webhook ingestion.
- Features: POST endpoint, Async processing, Neon DB storage.
- Try it:
aerostack init --template=webhook-neon
How to use these examples
All examples are available directly via the Aerostack CLI. When you run aerostack init, you can select your template interactively or specify it with the --template flag.
Benefits of using Templates
- Zero Config: Pre-configured
aerostack.tomlandpackage.json. - Best Practices: Standard folder structures (
shared/,functions/). - Type Safety: Pre-configured TypeScript environments.