larvitamsettings

    0.7.1 • Public • Published

    Build Status Dependencies

    larvitamsettings

    Get and set settings from database. It is as simple as that!

    Installation

    npm i larvitamsettings

    Usage

    Setting name is limited to 100 characters ASCII Setting value is limited to ~65MB UTF-8

    const Settings = require('larvitamsettings');
     
    const settings = new Settings({
        db: require('larvitdb'), // See https://github.com/larvit/larvitdb for configuration details
     
        // OPTIONAL
        log: new (new (require('larvitutils')())).Log() // Compatible with winston logging instance
    });
     
    await settings.set('setting name', 'setting value - woho');
     
    const settingValue = await settings.get('setting_name');
     
    console.log(settingValue); // "setting value - woho"
     

    Install

    npm i larvitamsettings

    DownloadsWeekly Downloads

    24

    Version

    0.7.1

    License

    ISC

    Unpacked Size

    13.6 kB

    Total Files

    14

    Last publish

    Collaborators

    • gagge
    • klabbekluck
    • lilleman