Start Next.js Server

Last Updated : 25 Sep, 2025

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
Nextjs-installations
Start Nextjs.Server installations

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-app

Project Structure:

Project 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.

index.js
'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 dev

Output:

Screenshot-2025-04-24-160941
How To Start Next.js Server?
  • 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.
Comment
Article Tags:

Explore