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

bookCreating a Next.js Project

メニューを表示するにはスワイプしてください

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?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  3

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 1.  3
some-alt