allow overriding the web daemon

This commit is contained in:
Sean Yesmunt 2019-03-08 15:12:20 -05:00
parent 84d3736ab4
commit b44fe83336
2 changed files with 4 additions and 1 deletions

View file

@ -61,7 +61,8 @@ ipcRenderer.on('navigate-forward', () => {
// @endif
// @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
// We need to override Lbryio for getting/setting the authToken

View file

@ -64,6 +64,8 @@ const baseConfig = {
}),
new DefinePlugin({
__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),
}),
],
};