moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 513 forks source link

How to disable persistence? #761

Open clarkewd opened 5 years ago

clarkewd commented 5 years ago

I tried this to disable persistence:

module.exports = {
  persistence: false
};

But that results in an error:

/usr/src/app/lib/cli.js:165
      opts.persistence.path = program.db;
                            ^
TypeError: Cannot assign to read only property 'path' of false
    at /usr/src/app/lib/cli.js:165:29
    at cli (/usr/src/app/lib/cli.js:305:12)
    at Object.<anonymous> (/usr/src/app/bin/mosca:19:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

How can I disable persistence?