From b44fe83336ff51733f3d2e9fbc759d6535d4429f Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 8 Mar 2019 15:12:20 -0500 Subject: [PATCH] allow overriding the web daemon --- src/ui/index.js | 3 ++- webpack.base.config.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/index.js b/src/ui/index.js index 2e12388e4..ab7ebaf76 100644 --- a/src/ui/index.js +++ b/src/ui/index.js @@ -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 diff --git a/webpack.base.config.js b/webpack.base.config.js index 8eddd9bc7..d76cca6c7 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -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), }), ], };