Open Oshuma opened 12 years ago
Does it create the given storage at the first time (in setup
) or does it save each change?
Hasn't been implemented yet, but it will probably work like this: After AppConfig.setup()
is called and completed, it will write the file once, then you must call AppConfig.save!
in order to write to disk. I'd advise against writing on each change, as that may not always be the desired behavior and might lead to hammering the disk (if you assign a lot of config vars).
Does it make sense to create the database? You have to start the MongoDB deamon first and it will create the specified directory if it doesn't exist.
This is my opinion.
Using a
create: true
storage option when callingAppConfig.setup!()
creates (or writes to) the given storage (YAML file, Mongo collection, etc.).