Getting Started

Let's create a new Nitro app in few steps.

Play Online

Open on StackblitzOpen on CodeSandbox

Starter Template

Make sure you have installed the recommended setup:

Create a new project using starter template:

npx
npx giget@latest nitro nitro-app
pnpm
pnpm dlx giget@latest nitro nitro-app
bun
bunx giget@latest nitro nitro-app
cd nitro-app

Install the dependencies:

npm
npm install
yarn
yarn install
pnpm
pnpm install
bun
bun install

Start the development server:

npm run dev

๐Ÿช„ Your API is ready at http://localhost:3000/

Check .nitro/dev/index.mjs if want to know what is happening

Build your production-ready server:

npm run build

Output is in the .output directory and ready to be deployed on almost any provider with no dependencies.

You can try it locally with:

npm run preview

Edge Release Channel

Nitro offers an edge release channel that automatically releases for every commit to main branch.

You can opt-in to the edge release channel by updating your package.json:

Nitro
{  "devDependencies": {--    "nitropack": "^2.0.0"++    "nitropack": "npm:nitropack-edge@latest"  }}
Nuxt
{  "devDependencies": {--    "nuxt": "^3.0.0"++    "nuxt": "npm:nuxt3@latest"  }}
If you are using Nuxt, use the Nuxt edge channel as it already includes nitropack-edge.

Remove the lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb) and reinstall the dependencies.