TanStackT
TanStack8mo ago
9 replies
worthy-azure

How to use updated client env variable value in production app?

I'm using t3 env + trpc for current tanstack app. After build the image for the bun preset. when i run the app in production i'm getting env variable error as shown in images. I'm running app using bun run .output/server/index.mjs in production.

How can i pass env variable when i run the bun run .output/server/index.mjs command and how to actually parse it in trpc routes. Since it server using import.meta.env.VITE_API_URL it not a best option right!!!
image.png
image.png
image.png
image.png
Was this page helpful?