VelaVela
Getting Started

Installation

Install Vela with a working TypeScript 7 and Workers build configuration.

Create an application

Use Node.js 24+ and pnpm 11.11.0. The CLI creates a small application with pinned, published npm dependencies and a working decorator build:

pnpm dlx @velajs/cli@latest new my-api
cd my-api
pnpm install
pnpm typecheck
pnpm build
pnpm dev

Commit the pnpm-lock.yaml generated by installation. Follow the quick start to send your first request.

Packages

The starter uses @velajs/vela, @velajs/cloudflare, and Hono. Authentication, CRUD, storage, and other integrations are optional and can be installed when the application needs them.

For an existing project, consult the published core package and Cloudflare package for their peer dependencies. Install required peers explicitly.

TypeScript and decorators

The starter separates typechecking from JavaScript compilation:

  • pnpm typecheck runs TypeScript 7 without emitting JavaScript.
  • pnpm build runs SWC with legacy decorators and decorator metadata enabled.
  • pnpm dev runs Wrangler, which rebuilds the compiled Worker when source changes.

Setting experimentalDecorators in tsconfig.json alone does not configure Wrangler to emit constructor metadata. Keep the starter's .swcrc and wrangler.jsonc together when adapting the build to another project.

Edit on GitHub

Last updated on

On this page