Quick Start — Functions
Go from zero to a deployed Function in under 2 minutes.
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- An Aerostack account (sign up free)
-
Install the CLI
Terminal window npm install -g @aerostack/cli -
Log in
Terminal window aerostack login -
Create a new function
Pick a template to start with a working app:
Terminal window # REST API with Hono + D1 databaseaerostack init my-app --template api# REST API with Neon PostgreSQLaerostack init my-app --template api-neon# WebSocket group chataerostack init my-app --template ws-chat# Conversational AI agentaerostack init my-app --template ws-voice-agent# SSE AI streamingaerostack init my-app --template ai-stream# Multiplayer game state syncaerostack init my-app --template ws-multiplayer-gameSee all 8 templates: Templates
Start with a clean project:
Terminal window aerostack init my-appcd my-appThis creates:
my-app/├── src/│ └── index.ts ← Your function code├── aerostack.toml ← Configuration├── package.json└── tsconfig.json -
Run locally
Terminal window cd my-appnpm installaerostack devYour function is running at
http://localhost:8787. All platform bindings (DB, Cache, Queue, AI, Vector Search, Storage) work locally out of the box. -
Deploy
Terminal window aerostack deploy functionThat’s it. Your function is live on Cloudflare’s edge in 300+ data centers. The CLI outputs your live URL.
Deploying function: my-appBuilding... done (1.2s)Uploading... doneBindings configured:DB → aerostack-core (Database)CACHE → project-cache (Cache)QUEUE → project-queue (Queue)AI → Workers AIVECTORIZE → project-vectors (Vector Search)STORAGE → project-storage (Storage)Live at: https://my-app.your-project.aerostack.dev
What just happened?
Section titled “What just happened?”aerostack initscaffolded a TypeScript project withaerostack.tomlconfigurationaerostack devstarted a local dev server with all 6 platform bindings simulated locallyaerostack deployuploaded your code to Cloudflare’s edge, wired up real bindings, and gave you a URL
No Docker. No Kubernetes. No infrastructure config. One command to develop, one command to deploy.
Next steps
Section titled “Next steps”- Browse templates — 8 starter templates you can deploy right now
- Build a Bookmarks API — step-by-step tutorial with DB and Cache
- Platform bindings — learn what
env.DB,env.CACHE,env.AI, etc. can do - Deploy guide — CLI, dashboard, secrets, and cron configuration
- Publish to Hub — share your Function with the community marketplace