WritheM / Wallace

https://plug.dj/writhem-radio
Other
4 stars 3 forks source link

Better configuration system #41

Open ylt opened 9 years ago

ylt commented 9 years ago

https://www.npmjs.com/package/config Great quality, it's missing saving and reloading however

https://www.npmjs.com/package/hi-config Has saving and reloading, but problems are that it has no github repository (despite being "MIT" licensed) and the property storage is flat.

Rest of the node modules were even more lacking, so have to write one mostly written from scratch. Considering taking the useful parts out of node-config and expanding the remainder in order to get clean two-way saving.

Would be nice to have internal isolation between "defaults" and actual configured settings. Maybe most flexible approach would be to make a single file loader class, and then make another class capable of accessing multiple nested config classes within (in failover).

pironic commented 9 years ago

how is this different from #42?

ylt commented 9 years ago

This is for user configuration (plug username, password, etc), #42 is plugin configuration

ylt commented 9 years ago

Allow retrieving shared configs - this would be useful in order to implementing basicbot. eug3gml

Might be worth investigating if the config system itself can be made flexible such as allowing a file per plugin, or using a database - with the design I have in mind, it won't be much of an extension but will have to be thought out ahead of time to save having to redo parts.