-
Notifications
You must be signed in to change notification settings - Fork 66
zh Configuration
github-actions[bot] edited this page Jul 6, 2026
·
2 revisions
简介 · 功能特性 · 技术栈 · 快速开始 · 部署 · 项目结构 · 系统架构 · 小部件 · API · 数据库 · 设置 · 安全 · 配置 · 路线 · License
-
wrangler.jsonc— 本地开发(wrangler dev);不含vars,Access 变量仅在控制台配置 -
wrangler.production.jsonc.example— 生产配置模板 -
wrangler.production.jsonc— 你的生产配置(gitignore,从模板复制或脚本生成);不含vars/密钥,避免部署覆盖控制台配置
根目录 wrangler.jsonc 示例:
前端构建产物输出到 server/public/(web/vite.config.ts 的 build.outDir)。
{ "name": "ternssh", "main": "server/src/index.ts", "assets": { "directory": "./server/public", "not_found_handling": "single-page-application", "run_worker_first": ["/api/*"] }, "d1_databases": [{ "binding": "DB", "database_name": "ternssh", "database_id": "local-ternssh-db", "migrations_dir": "server/migrations" }], "durable_objects": { "bindings": [{ "name": "SSH_SESSION", "class_name": "SshSession" }] }, "migrations": [{ "tag": "v1", "new_sqlite_classes": ["SshSession"] }] }