01!^3r
TTCTheo's Typesafe Cult
•Created by 01!^3r on 6/25/2023 in #questions
TRPC works in local but got 404 in production
I am having this in my next.config.js
on top of trpc, I am also using some python serverless functions with fastAPI to work with some data science libraries, and I protect those fastAPIs with a simple x-shared-key headers with the above set up
Everything works smoothly, but in production, for some reason the trpc endpoint got 404 when the frontend's trying to query during production (not in dev)
I also noticed that the
/api/auth
endpoint was working
but the /api/trpc/[trpc]
endpoint was showing a webpage with 404 as opposed to a api endpoint
this is my middleware.ts which doesn't seem to affect it as well
Maybe I got the routing incorrectly configured?
Thank you guys!2 replies