aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-10-02 16:57:48 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-10-02 16:57:48 -0500
commitb6234612e54808f056e82e3e131a8c53aa3faa96 (patch)
tree5229054b5e6faeed5585acb21c2a400584e262c6 /src
parentd6a83e4a8c1b5c9971819a5d4287d8a03889d70c (diff)
downloadslskd-b6234612e54808f056e82e3e131a8c53aa3faa96.tar.gz
add rootUrl
Diffstat (limited to 'src')
-rw-r--r--src/web/src/config.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/src/config.js b/src/web/src/config.js
index 4d6522e3..bd05aea5 100644
--- a/src/web/src/config.js
+++ b/src/web/src/config.js
@@ -1,4 +1,5 @@
-const baseUrl = process.env.NODE_ENV === 'production' ? 'api/v0' : 'http://localhost:5000/api/v0';
+const rootUrl = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:5000';
+const baseUrl = `${rootUrl}/api/v0`;
const tokenKey = 'slskd-token';
const tokenPassthroughValue = 'n/a';
const activeChatKey = 'slskd-active-chat';
@@ -6,6 +7,7 @@ const activeRoomKey = 'slskd-active-room';
const activeUserInfoKey = 'slskd-active-user';
export {
+ rootUrl,
baseUrl,
tokenKey,
tokenPassthroughValue,