Closed adamfitzgibbon closed 7 years ago
https://github.com/nwjs/nw.js/wiki/save-persistent-data-in-app I was looking at this for some configuration settings storage. Think this'd help you too? Whatever 'out-of-app' storage is used should probably be shared by everything.
Yeah this could be an option, I guess I should have looked more into what node supported before making my own thing. On login I create an Application Data folder in a certain path based on the OS, so if you want to store config settings you can use the same folder. Once I finish off the job history tasks as specified in the pull request, we should be able to pull in the changes so you can get those too.
Hey, that could work for me. Especially for configuration, don't exactly need a full database to store everything
Yeah, that makes sense.
Can someone create a service to abstract some of this logic away? I can forsee a few api calls aready:
getFile(
This way, everything can be stored in the same directory, but the logic is all inside a service (like connection service) that can be shared between many controllers.
I made a service in the clusterLanding controller, is it better to have them separate from the controller?
Currently I think it supports getFilePath() -> jobhistory.json path and getDataPath() -> path to folder I believe.
i think the service should be in it's own module, much like ConnectionService.
This was also addressed at some point.
Data is needed to be stored outside of the project folder so that the application can be updated without refreshing any stored data (specifically for job history)