server host
This commit is contained in:
parent
a826caafad
commit
b16c2b395d
1
.env.template
Normal file
1
.env.template
Normal file
|
|
@ -0,0 +1 @@
|
|||
VITE_SERVER_HOST # Required. Example api.website.com
|
||||
6
src/shared/config.ts
Normal file
6
src/shared/config.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { getEnvVar } from "./lib/getEnvVar";
|
||||
|
||||
export const SERVER_HOST = getEnvVar("VITE_SERVER_HOST");
|
||||
|
||||
export const IS_SSL = window.location.protocol === "https:";
|
||||
export const API_HOST = `${IS_SSL ? "https://" : "http://"}${SERVER_HOST}/api`;
|
||||
Loading…
Reference in New Issue
Block a user