Installation

Install MiiaJS and a server adapter for your runtime.

The fastest way to start a new project is with the @miiajs/cli:

bunx @miiajs/cli new my-app
cd my-app

The CLI will prompt you to choose a runtime (Bun, Deno, or Node.js), generate the project structure, install dependencies, and configure TypeScript - all in one step. Then run:

bun run dev

If you prefer to set things up manually, follow the steps below.

Manual setup

Core package

bun add @miiajs/core

Server adapters

MiiaJS exposes a standard fetch handler. Choose a server adapter for your runtime:

Bun & Deno

No additional package needed. app.listen() auto-detects the runtime.

Node.js

bun add @miiajs/node-server

uWebSockets.js

bun add @miiajs/uws-server uWebSockets.js@uNetworking/uWebSockets.js#v20.64.0

TypeScript configuration

MiiaJS requires ES2025 for TC39 decorator support:

{
  "compilerOptions": {
    "target": "ES2025",
    "module": "nodenext",
    "verbatimModuleSyntax": true
  }
}

For the full list of packages, see Packages.