Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Creating a Next.js Project | Section
Building Web Apps with Next.js

bookCreating a Next.js Project

Swipe to show menu

Before building applications with Next.js, you need to create a project with the correct setup. Next.js provides an official tool that handles everything for you, so you do not need to configure the project manually.

The easiest way to start is by using the create-next-app command. It creates a ready-to-use project with the App Router, development tools, and a clean structure.

Create a New Project

Run the following command in your terminal:

npx create-next-app@latest my-app

You will be asked a few setup questions, such as:

  • Do you want to use TypeScript?
  • Do you want to use Tailwind CSS?
  • Do you want to use the App Router?

For this course:

  • Choose Yes for TypeScript;
  • Choose Yes for Tailwind CSS;
  • Choose Yes for the App Router.

After the setup is complete, navigate into the project folder:

cd my-app

Start the Development Server

Run the following command:

npm run dev

Then open your browser and go to:

http://localhost:3000

You will see your Next.js app running.

What You Get by Default

The created project already includes: a working Next.js configuration, a basic folder structure using the App Router, development scripts, optional TypeScript support, optional Tailwind CSS setup.

You do not need to install or configure routing, bundling, or optimization tools manually.

question mark

Which command is used to create a new Next.js project?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 3

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Section 1. Chapter 3
some-alt