Closed franfdezmorales closed 1 year ago
Hey 👋
If environment variables are only accessible this way, you don't have other options.
Also, the docs do not recommend using/mutating global state, unlike other FaaS offerings where it is considered best practice to manage connections/pools in global scope (AWS lambdas I'm looking at you).
AFAIK, the underlying planetscale driver used is making calls over fetch API and is stateless, so no real harm in instantiating many instances.
Great, thank you very much for the quick response, very grateful for the work you are doing. Feel free to close the issue if you want to.
Hello!
I am doing a small side project, currently cloudfare workers has been migrated to an ES module system, with this change, the environment variables can only be accessed through the handler, is it correct that every time a route is called a Kysely instance is generated?