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.jsin thepagesdirectory. - Install next
npm install next - Install react
npm install react react-dom -
Add the scripts to
packages.jsonusing the codejson
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},