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
create-next-app nextjs-app \
Your fresh Next.js app is now in the
Now enter the directory and run the app in development mode.
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
ready - started server on 0.0.0.0:3000, url: http://localhost:3000