Quickstart
Get from zero to a globally deployed API in under five minutes. If you don’t have the CLI yet, start with Installation.
Install the SDK
Section titled “Install the SDK”npm install @vega/sdkCreate your first endpoint
Section titled “Create your first endpoint”import { vega } from '@vega/sdk';
export const api = vega.app({ region: 'global' });
api.get('/hello', () => Response.json({ message: 'Hello from the edge' }));Deploy
Section titled “Deploy”vega deployCompiling api/index.ts…✓ Built in 1.2s✓ Deployed to 28 regions→ https://acme-api.vega.dev (42ms p99)Your API is now live in 28 regions. Run vega logs --follow to watch requests stream in.
Where to next
Section titled “Where to next”- Core concepts — apps, the request context, regions, deployments
- Edge caching — make the fast path the default with
cache.swr() - API reference — the full
@vega/sdksurface