logo image
  • Build progress docs

    • Start NextJs project
    • Install linting and formatting (optional)

    • Setup Mongo DB
    • Setup authentication

    • Setup dark mode
    • Multiple languages
    • Setup online payment

    • Setup live chat
    • Setup Top Progress Loader
  • Other tech docs

    • Useful commands in Yarn
    • Basic Git tutorial
    • Basic Gitlab
    • Install WSL in Window
    • Testing - Jest testing library
    • Tools

    • Using icons in NextJs
    • Setup environment variables
    • Basic of Moongoose, MongDB
    • Unitest in Next.js
    • NVM - Node version management
    • Write CI/CD Gitlab for Next.js
    • Setup Messenger live chat for Next.js/React.js
  1. Home
  2. Build Progress Docs
  3. Start Nextjs Project

Start a new NextJS project

This in this tutorial we will learn how to create a new NextJS project, setup everythings and then start our server.


Quick start

We will quickly move on to creating a new Next project by automatic installation from Next Office.

Choose the folder

Choose the folder where you want to store your source codes. Please note that do not store your source on the public folders or deskstop, or any folder that can be easy see by other peoples (it is just for security).

For example:

bash
user/work-space/source-code/

Security note!

Please note that do not store your source on the public folders or deskstop, or any folder that can be easy see by other peoples.

Create a new project

Run this command to create a new Next project:

bash
npx create-next-app@latest

When install, you will see some questions like that:

bash
What is your project named? my-app Would you like to use TypeScript? No / Yes Would you like to use ESLint? No / Yes Would you like to use Tailwind CSS? No / Yes Would you like your code inside a `src/` directory? No / Yes Would you like to use App Router? (recommended) No / Yes Would you like to use Turbopack for `next dev`? No / Yes Would you like to customize the import alias (`@/*` by default)? No / Yes What import alias would you like configured? @/*

I recommend use all recommend from NextJS: use TypeScript, Eslint, Tailwind CSS, App Router.

Start server

After download and installing we have the source code like that:

nextjs folder structure

Open your terminal to run start server command:

bash
yarn dev

This command is defined on the package.json:

start server commands in nextjs

After that, go into the browser and type: http://localhost:3000 to see the result:

nextjs server started
Next
Install linting and formatting (optional)

On this page

  1. Quick start

    1. Choose the folder
    2. Create a new project
    3. Start server