- Nextjs API post request example
- How to handle post request in Nextjs stack overflow
- SWR - React hooks for data fetching
- Connecting Nextjs with Google Sheets
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
- Please note that before pushing, run vercel build in root directory to verify whether it will build on Vercel.