Cannot perform I/O on behalf of a different request
I'm trying to use the
postgres
library with neon.tech but I get this error:
1 Reply
you won't be able to initiate
postgres
like this outside of a fetch
(etc.) handler
a common approach is to create a lib that you import inside your handler, then pass that instance around to your other methods, or store it in something like AsyncLocalStorage