added config npm
This commit is contained in:
parent
5569e53e2d
commit
92786795d2
4 changed files with 21 additions and 2 deletions
8
config/custom-environment-variables.json
Normal file
8
config/custom-environment-variables.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"WalletConfig": {
|
||||
"lbryAddress": "LBRY_WALLET_ADDRESS"
|
||||
},
|
||||
"AnalyticsConfig":{
|
||||
"googleId": "GOOGLE_ANALYTICS_ID"
|
||||
}
|
||||
}
|
8
config/default.json
Normal file
8
config/default.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"WalletConfig": {
|
||||
"lbryAddress": "none"
|
||||
},
|
||||
"AnalyticsConfig":{
|
||||
"googleId": "none"
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
var fs = require('fs');
|
||||
var lbryApi = require('../helpers/lbryApi.js');
|
||||
var config = require('config');
|
||||
var walledAddress = config.get('WalletConfig.lbryAddress');
|
||||
|
||||
function handlePublishError(error) {
|
||||
if (error.code === "ECONNREFUSED"){
|
||||
|
@ -24,8 +26,8 @@ function createPublishParams(name, filepath, license, nsfw) {
|
|||
"license": license,
|
||||
"nsfw": (nsfw.toLowerCase() === "true")
|
||||
},
|
||||
"claim_address": "", // fill in wallet address
|
||||
"change_address": "" // fill in wallet address; requires daemon 0.12.2rc1 or above
|
||||
"claim_address": walledAddress,
|
||||
"change_address": walledAddress //requires daemon 0.12.2rc1 or above
|
||||
};
|
||||
return publishParams;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"dependencies": {
|
||||
"axios": "^0.16.1",
|
||||
"body-parser": "^1.17.1",
|
||||
"config": "^1.26.1",
|
||||
"express": "^4.15.2",
|
||||
"express-handlebars": "^3.0.0",
|
||||
"nodemon": "^1.11.0",
|
||||
|
|
Loading…
Reference in a new issue