Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Scan le Gentil
duniter-currency-monit
Commits
12a16e62
Commit
12a16e62
authored
Apr 19, 2020
by
Cédric Moreau
Browse files
[add] new `--reset-data` option to fully reset Monit's local data (blockchain)
parent
062e0b7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
index.js
View file @
12a16e62
...
...
@@ -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
:
[{
...
...
lib/main.js
View file @
12a16e62
...
...
@@ -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
();
})
...
...
lib/webserver2.ts
View file @
12a16e62
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment