From b6234612e54808f056e82e3e131a8c53aa3faa96 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 2 Oct 2021 16:57:48 -0500 Subject: add rootUrl --- src/web/src/config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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, -- cgit v1.2.3