Closes #141
This commit is contained in:
parent
45eb5d5a5a
commit
3d93117df8
4 changed files with 29 additions and 3 deletions
26
.env.sample
Normal file
26
.env.sample
Normal file
|
@ -0,0 +1,26 @@
|
|||
# The location of your hosted daemon, sans protocol (so, daemon.your.site instead of https://daemon.your.site)
|
||||
# HTTPS is assumed for security reasons
|
||||
DAEMON_URL=
|
||||
|
||||
# https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app
|
||||
# We use this to show the GitHub feed on the homepage
|
||||
GITHUB_OAUTH_TOKEN=
|
||||
|
||||
# You can use openssl to generate impossible to guess tokens
|
||||
# Ideally you would have a reference to this on your daemon so make sure that server is secure!
|
||||
# openssl rand -hex 32 || openssl rand -base64 32
|
||||
LBRY_DAEMON_ACCESS_TOKEN=
|
||||
|
||||
# Absolute path to the images folder you want the daemon to use on its server
|
||||
LBRY_DAEMON_IMAGES_PATH=
|
||||
|
||||
# Usually 443
|
||||
# This is commented-out for local development
|
||||
PORT=
|
||||
|
||||
# https://devcenter.heroku.com/articles/rediscloud
|
||||
REDISCLOUD_URL=
|
||||
|
||||
# https://api.slack.com/incoming-webhooks
|
||||
# We get notified when issues with this app happens, directly in Slack
|
||||
SLACK_WEBHOOK_URL=
|
|
@ -154,7 +154,7 @@ module.exports = exports = (data, socket) => {
|
|||
body: body,
|
||||
json: true,
|
||||
method: apiRequestMethod,
|
||||
url: `${process.env.NODE_ENV === "development" ? `http://localhost:5200/${resolveMethod}` : `https://daemon.lbry.tech/${resolveMethod}`}`
|
||||
url: `${process.env.NODE_ENV === "development" ? `http://localhost:5200/${resolveMethod}` : `https://${process.env.DAEMON_URL}/${resolveMethod}`}`
|
||||
}, (error, response, body) => {
|
||||
if (error) {
|
||||
if (process.env.NODE_ENV !== "development") {
|
||||
|
|
|
@ -17,7 +17,7 @@ module.exports = exports = publishMetadata => new Promise((resolve, reject) => r
|
|||
},
|
||||
json: true,
|
||||
method: "PUT",
|
||||
url: `${process.env.NODE_ENV === "development" ? "http://localhost:5200/publish" : "https://daemon.lbry.tech/publish" }`
|
||||
url: `${process.env.NODE_ENV === "development" ? "http://localhost:5200/publish" : `https://${process.env.DAEMON_URL}/publish` }`
|
||||
}, (error, response, body) => {
|
||||
if (error) resolve(error);
|
||||
resolve(body);
|
||||
|
|
|
@ -18,7 +18,7 @@ module.exports = exports = imageSource => new Promise((resolve, reject) => { //
|
|||
},
|
||||
json: true,
|
||||
method: "POST",
|
||||
url: `${process.env.NODE_ENV === "development" ? "http://localhost:5200/image" : "https://daemon.lbry.tech/image" }`
|
||||
url: `${process.env.NODE_ENV === "development" ? "http://localhost:5200/image" : `https://${process.env.DAEMON_URL}/image` }`
|
||||
}, (error, response, body) => {
|
||||
if (error) resolve(error);
|
||||
resolve(body);
|
||||
|
|
Loading…
Reference in a new issue