This is an example Next.js app which is locked to version 12.2.5 and shows the most basic idea behind Next. We have one page: pages/index.tsx
and a api route pages/api/hello.tsx
. The former responds to /
requests and the latter to /api/hello
.
Complete guide to deploy NextJs app with SSR enabled is here
.
Make any folder with the name you want to call it.
npx create-next-app . --use-npm --typescript -e https://github.com/malkitsingh/nextjs-12.2.5
npm i
npm run dev