Bun

Run Nitro apps with Bun runtime.

Preset: bun

Nitro output is compatible with Bun runtime. While using default Node.js you can also run the output in bun, using bun preset has advantage of better optimizations.

After building with bun preset using bun as preset, you can run server in production using:

bun run ./.output/server/index.mjs
Read more in bun.sh.

Environment Variables

You can use the PORT or NITRO_PORT and HOST or NITRO_HOST environment variables to set the server port.

Use the NITRO_BUN_IDLE_TIMEOUT environment variable to change the default idleTimeout.