mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 15:40:51 +01:00
Add .env variables in index
This commit is contained in:
parent
e70cc69762
commit
0f436898d3
5
.env
5
.env
@ -1,2 +1,7 @@
|
|||||||
BROWSER=none
|
BROWSER=none
|
||||||
GENERATE_SOURCEMAP=false
|
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
25629
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,9 +13,13 @@
|
|||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root" class="w-100 h-100"></div>
|
<div id="root" class="w-100 h-100"></div>
|
||||||
<script>
|
<script>
|
||||||
var NitroConfig = {
|
const NitroConfig = {
|
||||||
configurationUrls: [ '/renderer-config.json', '/ui-config.json' ],
|
"config.urls": ("%REACT_APP_CONFIG_URLS%").split(','),
|
||||||
sso: (new URLSearchParams(window.location.search).get('sso') || null)
|
"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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user