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

bookCreating a Next.js Project

Scorri per mostrare il 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?

Seleziona la risposta corretta

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 3

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

Sezione 1. Capitolo 3
some-alt