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

bookCreating a Next.js Project

Swipe um das Menü anzuzeigen

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?

Wählen Sie die richtige Antwort aus

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 3

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Abschnitt 1. Kapitel 3
some-alt