From eb51bdbfef8c2aacf0fdfde279a40de7f74c8d86 Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Mon, 18 Mar 2024 21:27:24 -0400 Subject: clean up, add better error handling --- fe/index.html | 2 +- fe/src/utils.ts | 2 +- fe/water.nginx.conf | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 fe/water.nginx.conf (limited to 'fe') diff --git a/fe/index.html b/fe/index.html index b6c5f0a..3b39d6f 100644 --- a/fe/index.html +++ b/fe/index.html @@ -4,7 +4,7 @@ - Vite + Svelte + TS + Track Your Water
diff --git a/fe/src/utils.ts b/fe/src/utils.ts index 9fddf41..41c733d 100644 --- a/fe/src/utils.ts +++ b/fe/src/utils.ts @@ -10,5 +10,5 @@ export function processFormInput(form: HTMLFormElement) { export function apiURL (path: string): string { const baseUrl = import.meta.env?.VITE_API_BASE_URL ?? "http://localhost:8080/api/v1"; - return `${baseUrl}${path}` + return `${baseUrl}/${path}` } diff --git a/fe/water.nginx.conf b/fe/water.nginx.conf new file mode 100644 index 0000000..a715845 --- /dev/null +++ b/fe/water.nginx.conf @@ -0,0 +1,12 @@ +server { + root /srv/www/water; + index index.html index.htm; + + listen 443 ssl; + listen [::]:443 ssl; + server_name water.example.com; + + location / { + try_files $uri $uri/ =404; + } +} -- cgit v1.1