-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nadim Ritter
committed
Aug 10, 2023
1 parent
2490cf5
commit 3c1aff9
Showing
23 changed files
with
149 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ node_modules | |
|
||
|
||
# local env files | ||
.env | ||
.env.* | ||
.env.local | ||
.env.*.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
window.VITE_SERVER_URL = 'http://localhost'; | ||
window.VITE_SERVER_PORT = '3000'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
. ./.env | ||
|
||
echo "window.VITE_SERVER_URL = '${VITE_SERVER_URL}';" > env.js | ||
echo "window.VITE_SERVER_PORT = '${VITE_SERVER_PORT}';" >> env.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//@ts-ignore | ||
export const SERVER_URL = window.VITE_SERVER_URL; | ||
export const SERVER_PORT = getServerPort(); | ||
|
||
console.log("SERVER_URL: " + SERVER_URL) | ||
console.log("SERVER_PORT: " + SERVER_PORT) | ||
|
||
function getServerPort(){ | ||
//@ts-ignore | ||
if(!window.VITE_SERVER_PORT){ | ||
return ""; | ||
} | ||
//@ts-ignore | ||
return ":" + window.VITE_SERVER_PORT; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
echo "window.VITE_SERVER_URL = '${VITE_SERVER_URL}';" > /app/server/dist/views/env.js | ||
echo "window.VITE_SERVER_PORT = '${VITE_SERVER_PORT}';" >> /app/server/dist/views/env.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const PROCTOR_SERVER_URL = process.env.PROCTOR_SERVER_URL; | ||
export const PROCTOR_SERVER_PORT = getServerPort(); | ||
export const PROCTOR_DEFAULT_URL = process.env.PROCTOR_DEFAULT_URL; | ||
|
||
export const NODE_ENV = process.env.NODE_ENV; | ||
export const SERVER_PORT = process.env.SERVER_PORT || ""; | ||
|
||
export const DEV_SERVER_URL = process.env.DEV_SERVER_URL | ||
export const DEV_SERVER_PORT = process.env.DEV_SERVER_PORT | ||
|
||
export const USERNAME = process.env.USERNAME | ||
export const PASSWORD = process.env.PASSWORD | ||
|
||
|
||
console.log("SERVER_URL: " + PROCTOR_SERVER_URL) | ||
console.log("SERVER_PORT: " + PROCTOR_SERVER_PORT) | ||
|
||
function getServerPort(){ | ||
if(!process.env.PROCTOR_SERVER_PORT){ | ||
return ""; | ||
} | ||
return ":" + process.env.PROCTOR_SERVER_PORT; | ||
}; |
Oops, something went wrong.