How To Create a Next JS App From Scratch
Procedure
- Create a directory for the app
- Create a sub-directory called
pages
- Create a file called
index.js
in thepages
directory. - Install next
npm install next
- Install react
npm install react react-dom
-
Add the scripts to
packages.json
using the codejson
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},