1. 14
    Migrate a Next API Route to App Router GET Route Returning a NextResponse
    2m 38s

Migrate a Next API Route to App Router GET Route Returning a NextResponse

InstructorBen Patton

Share this video with your friends

Send Tweet

We saw we had to have http methods in our route handlers when we moved our auth route handler over.

Now by moving our customers api route handler over we see a full implementation of an app router route handler.

To do this we'll need to make a couple changes. Similar to the previous route we migrated we will need to name our file route.ts. From that file we'll rename our function to GET as it returns a list customers.