Building a Next.js json api route
Demo: https://nextjs-json-api-route.now.sh
Clone the repository:
git clone https://github.com/Developerayo/nextjs-json-api-route.git && cd nextjs-json-api-route
Install the dependencies:
npm i next
To start the project run following command in your terminal:
npx next
Run the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.