diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2024-03-18 21:27:24 -0400 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2024-03-18 21:27:24 -0400 |
commit | eb51bdbfef8c2aacf0fdfde279a40de7f74c8d86 (patch) | |
tree | f8fdfb4e28fa271eda3027d84843e4b476831cdd /fe | |
parent | 5ddcd1cf663cc732819cfcb66f2ff6b1bbeb0d47 (diff) |
clean up, add better error handling
Diffstat (limited to 'fe')
-rw-r--r-- | fe/index.html | 2 | ||||
-rw-r--r-- | fe/src/utils.ts | 2 | ||||
-rw-r--r-- | fe/water.nginx.conf | 12 |
3 files changed, 14 insertions, 2 deletions
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 @@ | |||
4 | <meta charset="UTF-8" /> | 4 | <meta charset="UTF-8" /> |
5 | <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | 5 | <link rel="icon" type="image/svg+xml" href="/vite.svg" /> |
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
7 | <title>Vite + Svelte + TS</title> | 7 | <title>Track Your Water</title> |
8 | </head> | 8 | </head> |
9 | <body> | 9 | <body> |
10 | <div id="app"></div> | 10 | <div id="app"></div> |
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) { | |||
10 | 10 | ||
11 | export function apiURL (path: string): string { | 11 | export function apiURL (path: string): string { |
12 | const baseUrl = import.meta.env?.VITE_API_BASE_URL ?? "http://localhost:8080/api/v1"; | 12 | const baseUrl = import.meta.env?.VITE_API_BASE_URL ?? "http://localhost:8080/api/v1"; |
13 | return `${baseUrl}${path}` | 13 | return `${baseUrl}/${path}` |
14 | } | 14 | } |
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 @@ | |||
1 | server { | ||
2 | root /srv/www/water; | ||
3 | index index.html index.htm; | ||
4 | |||
5 | listen 443 ssl; | ||
6 | listen [::]:443 ssl; | ||
7 | server_name water.example.com; | ||
8 | |||
9 | location / { | ||
10 | try_files $uri $uri/ =404; | ||
11 | } | ||
12 | } | ||