At the end of this tutorial, you’ll be able to create new API Routes for your application.
route.ts
in the /apps/web/app/api is an API Route.
Here’s an example of an API Route that perform a Hello World:
withSession
helper:
withAuth
helper:
withAuth
accepts a second optional argument with the following structure: