• 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:

    var defaults = { a:1, b:2, c:3 };
    var s = require('Storage');
    if (s.read('.boot0') === undefined) {
           s.write('.boot0',`var settings = ${JSON.stringify(defaults)}`);
           settings = defaults;
      }
    
    print(settings);
    
    // add  function to update `.boot0` if settings change ....
    

    How do you save your app settings?

About

Avatar for MaBe @MaBe started