set API URL on build time

Signed-off-by: garionion <github@entr0py.de>
This commit is contained in:
garionion 2021-04-04 17:29:51 +02:00
parent 3335c68e80
commit d45d1ad56f
Signed by: garionion
GPG key ID: 53352FA607FA681A
3 changed files with 4 additions and 26 deletions

View file

@ -16,7 +16,7 @@ const enum HTTPMethod {
PATCH = "PATCH",
}
const url = "http://192.168.178.5:8080/api";
const url = import.meta.env.API_URL ?? import.meta.env.VITE_API_URL;
let token: token;
let ready = false;