app_config icon indicating copy to clipboard operation
app_config copied to clipboard

'create' boolean option to AppConfig.setup!()

Open Oshuma opened this issue 13 years ago • 3 comments

Using a create: true storage option when calling AppConfig.setup!() creates (or writes to) the given storage (YAML file, Mongo collection, etc.).

Oshuma avatar Aug 29 '12 06:08 Oshuma

Does it create the given storage at the first time (in setup) or does it save each change?

DSIW avatar Sep 02 '12 15:09 DSIW

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).

Oshuma avatar Sep 03 '12 03:09 Oshuma

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.

DSIW avatar Sep 15 '12 13:09 DSIW