01Cnode
01Cnode copied to clipboard
Add config/default.yaml to .gitignore and create it programatically
If I rewrite config/default.yaml
with my own defaults, I don't want to accidentally commit my changes.
Can we have this ignored by git and created programmatically?
Or, have a default.example.yaml
file and gitignore default.yaml
.
The config package handles this. Default.yaml can be left intact and you can create a file e.g. mainnet.yaml and edit the configs that you want changed. Omitted stuff gets inherited from default.yaml. You have to set NODE_ENV=mainnet to use mainnet.yaml. It has to be documented and a script that creates regtest, testnet and mainnet templates added to docker as well. Those could be in .gitignore.