aryzingA
tRPC3y ago
5 replies
aryzing

How to configure context for a standalone server?

Are there any examples out there on how to set up context for a standalone server? The docs do include an example for
next
, although it doesn't help much in setting one up for a standalone server.

How is context set up for a standalone server?
Solution
Thanks, in the end I found it here,
https://trpc.io/docs/server/adapters/standalone#2-configure-the-standalone-server

The standalone config docs use the
createContext
function but don't define it, and the createContext docs define it but don't use it with
createHTTPServer
, so had to put both doc pages together to figure out how to do it for the standalone server
Was this page helpful?