Is it possible to specify different Hyperdrives for different environments in TOML?
I need to specify stage and live environments in my TOML. The stage one has its own Hyperdrive, while production needs to have two differen Hyperdrives (production connects to one of two databases depending on user).
Is this possible?
Thank you.
4 Replies
In JSON, Wrangler's config looks like this - all non-inheritable keys (i.e bindings) need to be defined on a per-environment basis but otherwise it's just standard TOML.
Thank you! It was that
[[env.foo.hyperdrive]]
syntax I was missing - didn't realise you could bolt .hyperdrive
onto the end of the environment name.
Incidentally, what is the difference between [foo]
and [[foo]]
?Table vs array of tables.
To compare it to TS,
{}
and {}[]
You could also do an inline (array of) tables.
They are the exact same, just a different syntax.
So you could do...
to have multiple Hyperdrive bindings on your dev
environmentReally helpful, thanks!