Add .env variables in index

This commit is contained in:
Bill 2021-12-13 00:51:06 -05:00
parent e70cc69762
commit 0f436898d3
3 changed files with 25241 additions and 403 deletions

5
.env
View File

@ -1,2 +1,7 @@
BROWSER=none
GENERATE_SOURCEMAP=false
REACT_APP_CONFIG_URLS=/renderer-config.json,/ui-config.json
REACT_APP_SOCKET_URL=wss://ws.nitrots.co:2096
REACT_APP_ASSET_URL=https://nitro.nitrots.co
REACT_APP_IMAGE_LIBRARY_URL=https://swf.nitrots.co/c_images/
REACT_APP_HOF_FURNI_URL=https://swf.nitrots.co/dcr/hof_furni

25629
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,9 +13,13 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root" class="w-100 h-100"></div>
<script>
var NitroConfig = {
configurationUrls: [ '/renderer-config.json', '/ui-config.json' ],
sso: (new URLSearchParams(window.location.search).get('sso') || null)
const NitroConfig = {
"config.urls": ("%REACT_APP_CONFIG_URLS%").split(','),
"sso.ticket": (new URLSearchParams(window.location.search).get('sso') || null),
"socket.url": "%REACT_APP_SOCKET_URL%",
"asset.url": "%REACT_APP_ASSET_URL%",
"image.library.url": "%REACT_APP_IMAGE_LIBRARY_URL%",
"hof.furni.url": "%REACT_APP_HOF_FURNI_URL%"
};
</script>
</body>