As the official Create a Next.js App tutorial says, "there are many important details you need to consider to build a complete web application with React from scratch," but here I'm trying to get started as fast as possible.
Let's use npx and
npx \ create-next-app nextjs-app \ --use-npm \ --example \ "https://github.com/vercel/next-learn/tree/master/basics/learn-starter"
Your fresh Next.js app is now in the
Now enter the directory and run the app in development mode.
cd nextjs-app npm run dev # ready - started server on 0.0.0.0:3000, url: http://localhost:3000
You should be able to access the site at http://localhost:3000.
npm run build npm start ready - started server on 0.0.0.0:3000, url: http://localhost:3000