Next.js Commands Cheat Sheet - 2024.
- Posted on July 21, 2024
- Next.js
- By MmantraTech
- 240 Views
-xeFuSgfVdo.png)
Cheat sheet for common Next.js commands:
Project Setup
-
Create a New Project:
npx create-next-app@latest my-next-app
yarn create next-app my-next-app
pnpm create next-app my-next-app
Development
-
Run Development Server:
npm run dev
yarn dev
pnpm dev
Build and Production
-
Build for Production:
npm run build
yarn build
pnpm build
-
Start Production Server:
npm run start
yarn start
pnpm start
-
Export Static Pages:
npm run export
yarn export
pnpm export
Write a Response