Back to Next Js

runtime

docs/01-app/03-api-reference/03-file-conventions/02-route-segment-config/runtime.mdx

16.2.5556 B
Original Source

The runtime option allows you to select the JavaScript runtime used for rendering your route.

tsx
export const runtime = 'nodejs'
// 'nodejs' | 'edge'
js
export const runtime = 'nodejs'
// 'nodejs' | 'edge'
  • 'nodejs' (default)
  • 'edge'

Good to know:

  • Using runtime: 'edge' is not supported for Cache Components.
  • This option cannot be used in Proxy.