Automatically refresh lndhub token once a day
This commit is contained in:
2
index.js
2
index.js
@@ -120,6 +120,8 @@ function connectLndhub () {
|
||||
return lndhub.auth(config.lndhub.username, config.lndhub.password).then(connected => {
|
||||
if (connected) {
|
||||
console.log("Connected to Lndhub");
|
||||
// automatically refresh auth token once a day
|
||||
setInterval(lndhub.reauth, 86400000);
|
||||
} else {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user