Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(explorer): allow overriding internal indexer env variables #3237

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lucky-dodos-turn.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion packages/explorer/src/bin/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Member

@holic holic Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explorer env could prob use a bit of a refactor with a similar approach but don't need to block on that here

e.g. env object filled in based on flags and then override at the end with process.env to let env vars pass through

},
});
}
Expand Down
Loading