Chapter 2 of 21
Continue learning Next.js step by step.
Next.js Installation
Learn how to create and run a Next.js application.
Theory
Next.js applications can be created using create-next-app.
The command automatically creates a project structure and installs the required dependencies.
A Next.js project can be started in development mode using npm run dev.
Example
npx create-next-app@latest my-app
cd my-app
npm run devOutput
The Next.js development server starts and the application becomes available on the local development URL.
Practice
Create a new Next.js project and run it locally.
Interview Questions
1
How do you create a Next.js application?
2
Which command starts the Next.js development server?
3
What does create-next-app do?
Quick Quiz
Which option best describes this chapter?
A.create-next-app
B.create-react-database
C.next-install-project
D.react-create-server