🍃 Leaf

Next

Initialization

# No installation required
npx create-next-app@latest [init-option]

Initialization options:

More at create-next-app (nextjs.org).

Installation

npm i next react react-dom

Usage

next <command> [option]
next dev
next build
next start
# Use with npm scripts
npm run dev
npm run build
npm start
// package.json e.g.:
{
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  }
}

Options for dev and start:

More at Next.js CLI (nextjs.org).