Next.js
Beginner
1 min read
What Is Next.js and Why Use It
Example
# Create a new Next.js 14 project using the official CLI
npx create-next-app@latest my-next-app
# Prompts you will see:
# Would you like to use TypeScript? › Yes
# Would you like to use ESLint? › Yes
# Would you like to use Tailwind CSS? › Yes
# Would you like to use the `src/` directory? › No
# Would you like to use App Router? › Yes
# Would you like to customize the default import alias? › No
# Move into the project directory
cd my-next-app
# Start the development server with hot-reload
npm run dev
# => ready on http://localhost:3000
# Build for production
npm run build
# Start the production server
npm run start
# Key files created by create-next-app:
# app/layout.tsx - root layout (wraps every page)
# app/page.tsx - home page at /
# app/globals.css - global styles
# next.config.js - Next.js configuration
# tsconfig.json - TypeScript configuration
# tailwind.config.ts - Tailwind configuration
Related Resources
Next.js Reference
Complete tag & property list
Next.js How-To Guides
Step-by-step practical guides
Next.js Exercises
Practice what you've learned
More in Next.js