Skip to main content

Command Palette

Search for a command to run...

Setting Up Nextjs Project (Day 2)

Updated
1 min read
U

Reactjs|Nextjs|TypeScript|JavaScript

To set up the next Js project, you should follow this step:

Step 1: Install Nodejs on Your local machine (laptop)

You can download and install it from the official Node.js website here

Step 2: Open a Vscode terminal or command prompt and navigate to the desired directory where you want to create your Next.js project

step 3: Run the following command to initialize a new Next.js project:

npx create-next-app@latest my-next-app

once you run the command on your terminal, it would show the following responses:

Once the command finishes running, navigate to the project directory

cd my-next-app
npm run dev

This command will launch the Next.js development server, which will watch for changes in your code and automatically reload the application. it would run on your local server port (http://localhost:3000)

Congratulations! You have successfully created a simple Next.js project. You can now begin working on your application by editing the files in the pages directory. Any changes you make will be reflected in the browser automatically.

Always refer to the Next.js documentation here for more thorough instructions and to investigate the different features and capabilities offered by Next.js.