enkerrohah
CDCloudflare Developers
•Created by enkerrohah on 3/2/2024 in #workers-help
Set env for getPlatformProxy
I am writing tests for my project that uses a D1 database. I have
[env.test]
in my wrangler.toml
and I want to use the D1 binding that i have set in [env.test]
. I can pass { env: 'test' }
to unstable_dev
, but how can i set the same env to getPlatformProxy
? I need to manually query the database in my tests, so i would like to use the [env.test]
binding.
Or is there an easier way to access the database without getPlatformProxy
?1 replies