From d4d8a3ccc49852e64c8decf5151eafdb8e2326b5 Mon Sep 17 00:00:00 2001 From: twil3akine Date: Mon, 18 Aug 2025 21:25:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E3=82=A8=E3=83=A9=E3=83=BC=E6=96=87?= =?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - underがマイナスになっているときに最高diffが負の値になっているとなっていたのを修正 --- frontend/src/App.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 9ac34c3..7c53cfa 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -50,9 +50,9 @@ {#if errors.rangeError}

最低Diffが最高Diffを超えています。

{:else if errors.isMinusOverDiff} -

最低Diffが負の値になっています。

+

最高Diffが負の値になっています。

{:else if errors.isMinusUnderDiff} -

最高Diffが負の値になっています

+

最低Diffが負の値になっています

{/if} {#if errorMessage} From 4f3991e3e85cf193d9f2b85e5056dd5090705052 Mon Sep 17 00:00:00 2001 From: twil3akine Date: Tue, 19 Aug 2025 01:01:08 +0900 Subject: [PATCH 2/2] =?UTF-8?q?update:=20be=20API=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=82=B9=E3=82=92.env=E3=81=A7=E7=AE=A1=E7=90=86=20r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env | 1 + frontend/src/App.svelte | 3 ++- package.json | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 frontend/.env diff --git a/frontend/.env b/frontend/.env new file mode 100644 index 0000000..a431aa5 --- /dev/null +++ b/frontend/.env @@ -0,0 +1 @@ +VITE_API_URL=https://atcoder-random-picker-be.fly.dev \ No newline at end of file diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 7c53cfa..a4c1453 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -26,8 +26,9 @@ errorMessage = null; try { + const API_URL = import.meta.env.VITE_API_URL; const res = await fetch( - `http://127.0.0.1:3000/?under=${under_diff}&over=${over_diff}` + `${API_URL}/?under=${under_diff}&over=${over_diff}` ); if (!res.ok) { diff --git a/package.json b/package.json index 60a6445..53a6422 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ }, "scripts": { "be": "cd backend && cargo run", + "be-deploy": "cd backend && fly deploy", "fe": "cd frontend && bun run dev", + "fe-deploy": "cd frontend && bun run build", "tw": "cd frontend && npx @tailwindcss/cli -i ./src/input.css -o ./src/output.css --watch", "dev": "npm-run-all --parallel be fe", "log": "git log --all --graph --oneline"