Last Updated:
Cover
Nextjs Default Template Preview Tejas Sawant

How to create nextjs project ?

Tejas Sawant
Tejas Sawant nextjs

In this section i am going to show you best way to create nextjs project. For creating nextjs project you must have installed to nodejs. After that you can proceed with this tutorial.

First open CMD/Terminal. Navigate to directory where you have to create your nextjs project.

cd Blog

Then type following command this command used to create nextjs project

 npm init next-app

After that it will ask you for project name if you don’t give project name then it will set default name as my-app.

Project Name
Giving Project Name

After that you have to choose template for your nextjs project. I am going with Default starter app.

Template for project
Choosing Template

After that all needed modules/packages will start downloading.

Downloading of packages
Auto downloading of packages.

After that navigate to project directory. and type command npm run dev if you are using npm or type yarn dev if you are using yarn.

cd test-app
yarn dev

You have successfully created nextjs project you can now visit to http://localhost:3000 You will see following screen.

Nextjs App
Nextjs App Default Preview

Reference : https://nextjs.org/docs/getting-started