Skip to content

feat: dev 環境で GitHub API / AtCoder API を使えるようにする - #61

Merged
zerozero-0-0 merged 1 commit into
mainfrom
feat/dev-api-setup
Sep 29, 2026
Merged

zerozero-0-0 merged 1 commit into
mainfrom
feat/dev-api-setup

Conversation

@zerozero-0-0

Copy link
Copy Markdown
Owner
  • .dev.vars.example を追加し、dev 用の環境変数を .dev.vars で渡せるようにする
  • 本番 KV の AtCoder レートをローカル KV にコピーする pnpm sync:atcoder を追加
  • README に開発環境のセットアップを追記

- .dev.vars.example を追加し、dev 用の環境変数を .dev.vars で渡せるようにする
- 本番 KV の AtCoder レートをローカル KV にコピーする pnpm sync:atcoder を追加
- README に開発環境のセットアップを追記

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
portfolio fb76b72 Sep 28 2026, 11:45 PM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb76b72d71

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// dev のローカル KV は preview_id の namespace を使うので --preview を付ける
wrangler(
["kv", "key", "put", key, "--path", file, "--binding", BINDING, "--local", "--preview"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Write the synced value to the remote preview KV

pnpm dev ultimately starts wrangler dev --remote (package.json), so its LANG_STATS binding uses the remote preview_id, not Miniflare's local storage. This command writes only to local storage because of --local (Wrangler reports “Resource location: local”), meaning sync:atcoder can succeed while /api/atcoder in the documented dev server still sees an empty remote preview namespace and returns its unavailable response. Use the remote preview target (rather than --local) so the copied value is visible to the server users actually run.

Useful? React with 👍 / 👎.

@zerozero-0-0
zerozero-0-0 merged commit 5ca4f91 into main Sep 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant