Creating your first Next.js App
Setup:
Make sure your environment is ready
Install Node.js if you haven’t yet. You’ll need 10.13 or later to run the Next.js app.
You have already installed an IDE like vscode or any other.
Create Next.js App:
Go to your project’s directory and to create a Next.js app, run the following command in your terminal.
After you hit this command, you will be prompted to enter your project’s name. I have entered as the "next-app-example". Once you enter a name, then it will automatically install all the required dependencies.
If you have installed Node.js correctly then your first Next.js app is ready, yayy 🎉🎉.
Run the Server:
Now go to your project’s root folder.
Open your project with your favorite IDE.
In your IDE’s terminal or in the terminal at your project’s root folder, write the following command to run your project.
This will run your project in the development server. Check http://127.0.0.1:3000/ if your project is running.