diff --git a/index.js b/index.js index 2144830fa8ce0341195ee36de56cd98cc942a562..769d3aa6bc6b423147f02c8f0f8955dcbdee1951 100755 --- a/index.js +++ b/index.js @@ -42,7 +42,8 @@ module.exports = { }, cliOptions: [ - { value: '--monitor', desc: 'Enable performance monitoring of DB access'} + { value: '--monitor', desc: 'Enable performance monitoring of DB access'}, + { value: '--reset-data', desc: 'Forces Monit to reset its indexed data on startup'}, ], cli: [{ diff --git a/lib/main.js b/lib/main.js index 48cc399f2d256a47ff97d4ea28251e0c14417758..d6920fb60c7022023998449d51338c1ef833b2af 100755 --- a/lib/main.js +++ b/lib/main.js @@ -48,7 +48,7 @@ module.exports = (duniterServer, host, port, appParente, program) => co(function console.log("module currency-monit started"); // Specialized node's UI - let httpServer = webserver(host, port, appParente, duniterServer, monitDatasPath, offset, cache); + let httpServer = webserver(host, port, appParente, duniterServer, monitDatasPath, offset, cache, program.resetData); yield httpServer.openConnection(); }) diff --git a/lib/webserver2.ts b/lib/webserver2.ts index 64e2e42376251e61d37ef926736565ecbf7c8a4c..de0fd69a8f2b716429dd849df4cd58bce589b7aa 100755 --- a/lib/webserver2.ts +++ b/lib/webserver2.ts @@ -16,7 +16,7 @@ const bodyParser = require('body-parser'); const routes = require(__dirname + '/../routes'); const tpl = require(__dirname + '/tplit.js'); -module.exports = (host: any, port: any, appParente: any, duniterServer: Server, monitDatasPath: any, offset: any, cache: any, resetData: boolean = false) => { +module.exports = (host: any, port: any, appParente: any, duniterServer: Server, monitDatasPath: any, offset: any, cache: any, resetData: boolean) => { var app = express();