Skip to content

Commit 0910ebd

Browse files
hyperpolymathclaude
andcommitted
feat: cloudflare pages deploy config
* wrangler.toml — Pages project "nesy-solver", pages_build_output_dir=dist * public/app.js — switch /api/strategy?class=X to /api/strategy/X path form to match the V backend's /strategy/:class route * .gitignore — ignore dist/ (Pages build output) + .wrangler/ + node_modules/ Deploy (after `wrangler login`): mkdir -p dist && cp index.html dist/ && cp -r public dist/ cp deploy/_redirects dist/_redirects wrangler pages deploy dist --project-name=nesy-solver _redirects proxies /api/* to https://nesy-solver-api.fly.dev so the frontend stays portable — backend URL can change without frontend changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4088d6e commit 0910ebd

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,6 @@ sync_report*.txt
104104
# Hypatia scan cache (local-only)
105105
.hypatia/
106106
.zig-cache/
107+
dist/
108+
.wrangler/
109+
node_modules/

public/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function renderResult(body) {
144144
async function loadStrategy(classValue) {
145145
const target = classValue === "auto" ? "safety" : classValue;
146146
try {
147-
const resp = await fetch(`/api/strategy?class=${encodeURIComponent(target)}`);
147+
const resp = await fetch(`/api/strategy/${encodeURIComponent(target)}`);
148148
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
149149
const body = await resp.json();
150150
renderStrategy(body, target);

wrangler.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Cloudflare Pages deploy config for nesy-solver.
3+
#
4+
# Deploy (direct upload):
5+
# wrangler pages deploy dist --project-name=nesy-solver
6+
# Or preview on a named branch:
7+
# wrangler pages deploy dist --project-name=nesy-solver --branch=preview
8+
#
9+
# Custom domain (after first deploy):
10+
# wrangler pages domain add nesy-solver.dev --project-name=nesy-solver
11+
12+
name = "nesy-solver"
13+
pages_build_output_dir = "dist"
14+
compatibility_date = "2026-04-05"

0 commit comments

Comments
 (0)