Open fracek opened 10 months ago
This issue has been automatically marked as stale because it has not had activity in the six months. It will be closed in 2 weeks if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant.
Is your feature request related to a problem? Please describe.
At the moment, if I want to run multiple indexers concurrently, I need to create many terminal windows and run each one of them with
apibara run my-indexer.ts
. If I change my code, I then need to restart them individually.Describe the solution you'd like
We should have a configuration file (
apibara.config.ts
) where I can define all indexers I want to run. Then there should be a commandapibara up
that reads this configuration file and starts the indexers defined there.The configuration file should be in typescript/javascript so that developers can read environment variables and generate the indexers configuration at runtime.
Notice that the key of the
indexers
property will be used as thesink-id
if persistence is enabled.This feature requires some planning:
--allow-env
only accepts files.--allow-env=KEY=VALUE1,KEY2=VALUE2
Describe alternatives you've considered
We could use yaml/json for configuration. I believe using typescript is better because we get the following for free:
Additional context
This is related to the work on factory indexers.