Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=https://atcoder-random-picker-be.fly.dev
7 changes: 4 additions & 3 deletions frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -50,9 +51,9 @@
{#if errors.rangeError}
<p class="text-destructive mb-2 text-sm">最低Diffが最高Diffを超えています。</p>
{:else if errors.isMinusOverDiff}
<p class="text-destructive mb-2 text-sm">最低Diffが負の値になっています。</p>
<p class="text-destructive mb-2 text-sm">最高Diffが負の値になっています。</p>
{:else if errors.isMinusUnderDiff}
<p class="text-destructive mb-2 text-sm">最高Diffが負の値になっています</p>
<p class="text-destructive mb-2 text-sm">最低Diffが負の値になっています</p>
{/if}

{#if errorMessage}
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down