-
• #2
Hi! i made a simple localStorage module to save my settings, maybe can help you
This is a quick example on how to use it:var localStorage = require("localStorage").getInstance();
var settingsObject = localStorage.getObject('settings');
if (!settingsObject) {
console.log("setting not exists");
//here's how to set
localStorage.setObject('settings', { 'ssid': 'blablabla', 'password': 'blablabla' });
}
else {
console.log(settingsObject);
//use the settings
}
1 Attachment
Have the use case to save app settings to be restore after startup/reset and decided to use
.boot0
.This is the snippet I started with:
How do you save your app settings?