Setting Up Your Next.js Project

Step 1: Install Next.js

Open a terminal and run the following command to create a new Next.js app:

npx create-next-app@latest

Alternatively, use yarn:

yarn create next-app

Follow the prompts to set up your project, such as choosing a project name and adding TypeScript support if desired.

Step 2: Navigate to the Project Directory

cd your-project-name

Step 3: Run the Development Server

npm run dev

Open http://localhost:3000 in your browser to view your app.