A Nuxt 4 server-side rendering starter in TypeScript with Vue 3, for developers who want a Vue site rendered on the server with room for API routes. It includes file-based Home and About pages, a default layout, a Nitro route at GET /api/health, ESLint and Vitest.
by Light CloudFull-stack


The first request for a page is rendered to HTML by Nitro, then Vue takes over in the browser and later navigation happens client-side. Nuxt's conventions do most of the wiring: pages, layouts, components and utils are picked up by file location, and runtime config reads NUXT_ variables when the server starts. Most people first add pages in app/pages/ and server routes in server/api/, and put secrets in non-public runtimeConfig keys. Deploying runs npm run build, then npm start (node .output/server/index.mjs) in a container that listens on PORT.
Create a .vue file in app/pages/: app/pages/contact.vue becomes /contact. Add a NuxtLink to it in app/components/AppHeader.vue.
Create a file in server/api/ named after the path and method: server/api/hello.get.ts that exports defineEventHandler answers GET /api/hello.
Declare the key in runtimeConfig in nuxt.config.ts and read it with useRuntimeConfig(). Nuxt fills it from a matching NUXT_ variable when the server starts, for example NUXT_PUBLIC_SITE_NAME for runtimeConfig.public.siteName.
Yes. npm run generate prerenders the pages into .output/public for any static host, but server routes such as /api/health do not run there.
Yes. Any host with Node.js 22.22 or later runs it with npm run build and node .output/server/index.mjs, and .output/ can be copied to a server or Docker image without node_modules.