-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
♻️ refactorNeither fixes a bug nor adds a featureNeither fixes a bug nor adds a feature🚚 api - nextjs routes
Milestone
Description
Summary
Basically switching from pages/api to app/api. They do the same thing, but the new app directory is much better (see below why).
Why
- There's lotta new features
- Better web standards being maintained in the new
approuter (approuter now uses more standard APIs instead of using proprietary APIs in prevpagesrouter) - Easy to set up different REST API endpoints just by using functions with verbs as names. Need a
GETendpoint? Create aGET()function. Need aPOST/PUT/DELETEendpoint? Create a function with that name, that's it.
Basically the app router is the future of Next.js and it would be awesome if we could migrate.
Shouldn't be that complex of a migration, compared to the nightmare of switching the 'frontend' code to app router, remember that big PR (#36) I made few weeks ago? 😂
Links to Docs
Our existing API Routes: Pages Router - API Routes
New API Route Handlers: App Router - Route Handlers
Metadata
Metadata
Labels
♻️ refactorNeither fixes a bug nor adds a featureNeither fixes a bug nor adds a feature🚚 api - nextjs routes