neume-network / core

A socially-scalable music NFT indexer.
https://neume.network
GNU General Public License v3.0
26 stars 11 forks source link

add config for neume CLI #72

Closed il3ven closed 2 years ago

il3ven commented 2 years ago

This PR adds a --config option for CLI. This config is helpful to define rate limit for different endpoints.

workerData.queue.options is now part of config. This change enables us to validate config including queue options and endpoint with a single line. const valid = check(configSchema). The schema is defined here.