From 85bbeb8be12597f28cd1506dae0d44b34c1427e4 Mon Sep 17 00:00:00 2001 From: alvarius Date: Thu, 26 Sep 2024 14:17:45 +0100 Subject: [PATCH] fix(explorer): allow overriding internal indexer env variables (#3237) --- .changeset/lucky-dodos-turn.md | 5 +++++ packages/explorer/src/bin/explorer.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lucky-dodos-turn.md diff --git a/.changeset/lucky-dodos-turn.md b/.changeset/lucky-dodos-turn.md new file mode 100644 index 0000000000..3153c4c6bf --- /dev/null +++ b/.changeset/lucky-dodos-turn.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/explorer": patch +--- + +It is now possible to pass in environment variables like `RPC_HTTP_URL` to the internal local indexer when running the explorer locally. diff --git a/packages/explorer/src/bin/explorer.ts b/packages/explorer/src/bin/explorer.ts index 2eb358dd94..1e2f5d7956 100755 --- a/packages/explorer/src/bin/explorer.ts +++ b/packages/explorer/src/bin/explorer.ts @@ -114,12 +114,12 @@ async function startStoreIndexer() { cwd: packageRoot, stdio: "inherit", env: { - ...process.env, DEBUG: "mud:*", RPC_HTTP_URL: "http://127.0.0.1:8545", FOLLOW_BLOCK_TAG: "latest", SQLITE_FILENAME: indexerDatabase, STORE_ADDRESS: worldAddress, + ...process.env, }, }); }