Installation

Install MiiaJS and a server adapter for your runtime.

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

npx @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:

npm run dev

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

Manual setup

Core package

npm install @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

npm install @miiajs/node-server

uWebSockets.js

npm install @miiajs/uws-server

TypeScript configuration

MiiaJS requires ES2024 target for TC39 decorator support:

{
  "compilerOptions": {
    "target": "ES2024",
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "verbatimModuleSyntax": true
  }
}

Optional packages

PackageInstall
@miiajs/authAuthentication with JWT and local strategies
@miiajs/swaggerOpenAPI 3.1 spec and Swagger UI
@miiajs/drizzleDrizzle ORM integration
@miiajs/paprMongoDB integration via Papr