How do i properly set up nextjs external pages/api/* routes using trpc?
I have a working application, now for testing I want to create a few pages/api/* routes to see the raw data i get before pushing into a component.
I created pages/api/lessons with this content:
and I am getting an error:
I have trpc working on the index page (basic t3 app) but when i try to place it inside an nextjs route it never renders. If i remove trpc logic from the api route and just put some dummy data, it works fine. Where is my issue?
I created pages/api/lessons with this content:
and I am getting an error:
I have trpc working on the index page (basic t3 app) but when i try to place it inside an nextjs route it never renders. If i remove trpc logic from the api route and just put some dummy data, it works fine. Where is my issue?
