Skip to content

Commit

Permalink
chore: add Wrangler worker env for Josh (#1351)
Browse files Browse the repository at this point in the history
* chore: Add Wrangler worker env for Josh.

* chore: Add GATEWAY_URL to josh wrangler config.

* chore: Add default `GATEWAY_URL` var to wrangler template.
  • Loading branch information
joshJarr authored Jun 9, 2022
1 parent f445cda commit 74f4656
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/api/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# web3.storage wrangler config.

name = "web3-storage"
# `javascript` means our we'll send pre-built javascript code.
# `javascript` means our we'll send pre-built javascript code.
# ...as opposed to `webpack` where wrangler builds our code for us.
type = "javascript"

Expand Down Expand Up @@ -131,14 +131,22 @@ vars = { CLUSTER_API_URL = "https://alexandra-cluster-api-web3-storage.loca.lt",
[env.alexandra.durable_objects]
bindings = [{ name = "NAME_ROOM", class_name = "NameRoom0" }]

[env.josh]
workers_dev = true
account_id = "b649c9389ef9c1d318ac2945b2415046"
vars = { CLUSTER_API_URL = "https://josh-cluster-api-web3-storage.loca.lt", PG_REST_URL = "https://josh-postgres-api-web3-storage.loca.lt", ENV = "dev", GATEWAY_URL = "https://ipfs.io" }

[env.josh.durable_objects]
bindings = [{ name = "NAME_ROOM", class_name = "NameRoom0" }]

# Add your env here. Override the the values you need to change.

# Create your env name as the value of `whoami` on your system, so you can run `npm start` to run in dev mode.
# Copy this template and fill out the values
# [env.${whoami}]
# workers_dev = true
# account_id = "<get me from `wrangler whoami`"
# vars = { CLUSTER_API_URL = "https://<your ${whoami} here>-cluster-api-web3-storage.loca.lt", PG_REST_URL = "https://<your ${whoami} here>-postgres-api-web3-storage.loca.lt", ENV = "dev" }
# vars = { CLUSTER_API_URL = "https://<your ${whoami} here>-cluster-api-web3-storage.loca.lt", PG_REST_URL = "https://<your ${whoami} here>-postgres-api-web3-storage.loca.lt", ENV = "dev", GATEWAY_URL = "https://ipfs.io" }
#
# [env.${whoami}.durable_objects]
# bindings = [{ name = "NAME_ROOM", class_name = "NameRoom0" }]

0 comments on commit 74f4656

Please sign in to comment.