added config npm

This commit is contained in:
bill bittner 2017-06-12 14:56:40 -07:00
parent 5569e53e2d
commit 92786795d2
4 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1,8 @@
{
"WalletConfig": {
"lbryAddress": "LBRY_WALLET_ADDRESS"
},
"AnalyticsConfig":{
"googleId": "GOOGLE_ANALYTICS_ID"
}
}

8
config/default.json Normal file
View file

@ -0,0 +1,8 @@
{
"WalletConfig": {
"lbryAddress": "none"
},
"AnalyticsConfig":{
"googleId": "none"
}
}

View file

@ -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;
}

View file

@ -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",