Nuxt Local Development Guide
Build full-stack applications with Vue using Nuxt, featuring file routing and SSR/SSG, with local hot reloading at localhost:3000 by default.
Nuxt is a full-stack framework based on Vue, offering file routing, server-side rendering (SSR), static site generation (SSG), API routing, and automatic imports, comparable to Next.js in the Vue ecosystem.
Quick Start
npm create nuxt@latest my-nuxt-app
cd my-nuxt-app
npm install
npm run devDefault localhost Access
| Purpose | Address |
|---|---|
| Development Server | http://localhost:3000 |
To change the port: npm run dev -- --port 3001 or set devServer.port in nuxt.config.ts.
Common Commands
| Command | Description |
|---|---|
npm run dev | Development mode (HMR) |
npm run build | Production build |
npm run preview | Preview production build |
npm run generate | Static site generation (SSG) |
Directory Structure
pages/: File routing, automatically generates the routing tableserver/api/: Server-side API routescomponents/,composables/: Automatic imports, no manual import required
Deployment
Can be deployed to a Node server, Nuxt hosting platform, or generate a pure static site to .output/public.
Summary
Nuxt local development defaults to http://localhost:3000, suitable for Vue full-stack, SEO-friendly SSR applications, and content sites.