Angular

Litestar Vite supports Angular in two ways: Vite-based (using AnalogJS) and Angular CLI.

Option 2: Angular CLI

Standard Angular CLI workflow with proxy to Litestar.

litestar assets init --template angular-cli

This creates a standard Angular project that:

  • Uses ng serve for development

  • Proxies API requests to Litestar via proxy.conf.json

  • Builds to dist/browser/ for production

Proxy Configuration

{
  "/api": {
    "target": "http://localhost:8000",
    "secure": false
  }
}

Running Angular CLI

# Terminal 1: Litestar backend
litestar run --reload

# Terminal 2: Angular dev server
npm start

Access at http://localhost:4200 (Angular proxies API calls to Litestar).

Comparison

Aspect

Vite (Analog)

Angular CLI

Build Tool

Vite

Webpack

HMR Speed

Fast

Standard

litestar-vite-plugin

Yes

No

Type Generation

Enabled

Disabled

Port

Single (8000)

Two (4200 + 8000)

See Also