Closed hubdotcom closed 7 years ago
@hubdotcom I think you may have misread the code, it uses _.defaults so that 'secret' is just a value and will be replaced with opts.refreshSecret.
_.defaults
'secret'
opts.refreshSecret
You can see that we pass the env in bin/web.js: https://github.com/GitbookIO/nuts/blob/0c2c21a250f803931b3a124efec1cbc35b439be1/bin/web.js#L28
bin/web.js
That code you tried to patch gets all its inputs from the opts argument, ENVs should be mapped into an opts object by the caller, in the cli code rather than randomly accessing ENVs everywhere in the code.
opts
cli
@hubdotcom I think you may have misread the code, it uses
_.defaults
so that'secret'
is just a value and will be replaced withopts.refreshSecret
.You can see that we pass the env in
bin/web.js
: https://github.com/GitbookIO/nuts/blob/0c2c21a250f803931b3a124efec1cbc35b439be1/bin/web.js#L28