Skip to main content

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 the pages directory.

  • Install next npm install next

  • Install react npm install react react-dom

  • Add the scripts to packages.json using the code

    json "scripts": { "dev": "next dev", "build": "next build", "start": "next start" },

Adverts