Step 1: Creating a New Next.js Project
To create a new Next.js project, run the following command in your terminal.
npx create-next-app@latest my-app
cd my-app

Step 2: Move into the Folder
After creating your project folder (i.e. my-app ), move to it by using the following command:
cd my-appProject Structure:

Example: Before going to start the server, we are going to add some text to our homepage. For that, Add the below code in your index.js file.
'use client';
const Home = () => {
return (
<div>
<h1>This is a demo - GeeksforGeeks</h1>
<h2>Server is started</h2>
</div>
);
};
export default Home;
Step 3: Start the Server
Now to start the development server you have to type the below command in the terminal. This will start the development server for your Next.Js application and you will see the following output in the browser:
npm run devOutput:

- Whenever you make changes in your project during development, Next.js automatically reloads the browser with the updated content (Hot Reloading).
- Open http://localhost:3000 in your browser to see your running Next.js app.