Merge pull request #2311 from lbryio/web-daemon

allow overriding the web daemon
This commit is contained in:
Sean Yesmunt 2019-03-08 15:13:16 -05:00 committed by GitHub
commit 8c1e46a6f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -61,7 +61,8 @@ ipcRenderer.on('navigate-forward', () => {
// @endif // @endif
// @if TARGET='web' // @if TARGET='web'
Lbry.setDaemonConnectionString('https://api.lbry.tv/api/proxy'); const SDK_API_URL = process.env.SDK_API_URL || 'https://api.lbry.tv/api/proxy';
Lbry.setDaemonConnectionString(SDK_API_URL);
// @endif // @endif
// We need to override Lbryio for getting/setting the authToken // We need to override Lbryio for getting/setting the authToken

View file

@ -64,6 +64,8 @@ const baseConfig = {
}), }),
new DefinePlugin({ new DefinePlugin({
__static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`, __static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`,
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.SDK_API_URL': JSON.stringify(process.env.SDK_API_URL),
}), }),
], ],
}; };