How do I stop server code getting leaked to the client?
Hi, I have an util that should only be used by server code in orpc that leverages the
My router is currently set up this way:
and my client:
I saw online that you could use the
crypto module, but based on my browser logs I am getting errors such as:My router is currently set up this way:
and my client:
I saw online that you could use the
serverOnly() function to wrap the router to solve this but it provides an error:Error: serverOnly() functions can only be called on the server!