- resend - for email verification OTP(heavy pkge)
- bcrypt - for password hashing(light pkge)
- next.js run on edgetime
- it affect the db connection
- always call when new api route is made
- when connecting, if the connection is already there then use that else connect.
- api is a special file name under app dir for the api calls in next.js , instead of page.js we use route.js.
- unlike express, here we have to directly give the methods like POST,GET and all
export async function POST(request:Request) { }
- GET : read
- POST : create --most used by me
- PATCH : update
- DELETE : destroy
2** - good 4** - you messed up 5** - server broken
- const url=request.nextUrl;