swapper-org / NodeChain

Nodechain is a service that allows you to create nodes on a blockchain and connect to them natively through APIs. The goal is to allow the user to build their own nodes natively without having to rely on external services.
MIT License
7 stars 5 forks source link

Default configuration fallback #154

Closed bridgedragon closed 2 years ago

bridgedragon commented 2 years ago

Feature Request

Feature Description

Startup script have two auxiliar files: 'templateConfig.json' and 'config.json'.

With the purpose of abstracting the default variables to the final user (sysadmin), I think that 'config.json' should be in blank, using 'templateConfig.json' as a fallback.

For example, if you want to make your own configuration, you should only create a key in 'config.json', and nodechain will prioritize that configuration over the same key in 'templateConfig.json'.

That way, we are abstracting all default variables to the end user, and they will not have yo deal with knowing what a 'tcp://bitcoincore-testnet:28332' means, for example.

If this approach is used, 'templateConfig.json' should be renamed to 'defaultConfig.json', because it is not a template anymore.

bridgedragon commented 2 years ago

As the issue #130 follows the same principle, maybe the 'config.json' workflow should be entirely removed, and only overwriting default configuration if '--nodeparameters' are specified.