Skip to content

Commit

Permalink
hotfix for the optional lnrpcpath variable
Browse files Browse the repository at this point in the history
  • Loading branch information
saubyk committed Aug 30, 2021
1 parent 243494f commit 6c4cf1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ if (typeof global.REST_PLUGIN_CONFIG === 'undefined') {
global.logger = configLogger(global.config);

//LN_PATH is the path containing lightning-rpc file
global.ln = require('./lightning-client-js')(global.config.LNRPCPATH.trim() || process.env.LN_PATH);
let lnpath = (global.config.LNRPCPATH && global.config.LNRPCPATH.trim() !== '') ? global.config.LNRPCPATH.trim() : process.env.LN_PATH;
global.ln = require('./lightning-client-js')(lnpath);
app.use(bodyparser.json());
app.use(bodyparser.urlencoded({ extended: false }));
app.use((req, res, next) => {
Expand Down

0 comments on commit 6c4cf1d

Please sign in to comment.