local-temporal

作者: temporalio

針對本機 Temporal 伺服器建置版本而非內建 CLI 開發伺服器執行 UI 的說明。當被問到如何啟動開發環境時使用,…

npx skills add https://github.com/temporalio/ui --skill local-temporal

Local Temporal Dev Setup

To develop against a local build of the Temporal server, you need two things running in separate terminals.

Terminal 1 — Temporal server (from your local temporal repo)

Navigate to your local clone of the temporalio/temporal repo and start the server:

make start

This builds and starts the server with SQLite in-memory. If you want a specific branch, check it out first:

git checkout <branch-name>
make bins  # safe to run even if already built — outputs "Nothing to be done" and exits cleanly
make start

The server runs gRPC on port 7233 and HTTP on 7243.

Terminal 2 — UI dev server (this repo)

From this repo, use the local-temporal script instead of the default dev script:

pnpm dev:local-temporal

This loads .env.local-temporal which points the UI at the local server instead of spinning up its own.

Why not pnpm dev?

pnpm dev (aliased to pnpm dev:ui-server) starts a bundled Temporal server alongside the UI. pnpm dev:local-temporal skips that and connects to whatever is already running on the configured ports.

Keeping the ui-server in sync with the Temporal server branch

This is critical when working on unreleased features. The ui-server (server/) is a separate Go binary that acts as a grpc-gateway — it decodes HTTP/JSON into proto messages and forwards them to the Temporal server over gRPC. Its proto descriptors are baked in at compile time from its own server/go.mod.

If the Temporal server branch uses a newer go.temporal.io/api version than server/go.mod, the ui-server will reject any new HTTP fields as "unknown field" before the request ever reaches the Temporal server.

When switching to a Temporal branch with API changes:

  1. Check what go.temporal.io/api version the Temporal server branch uses:

    grep "go.temporal.io/api" ~/code/temporal/go.mod
    
  2. Update server/go.mod to match:

    cd server
    go get go.temporal.io/api@<version>
    
  3. Rebuild the ui-server binary:

    go build -o ui-server ./cmd/server
    
  4. Then restart pnpm dev:local-temporal to pick up the new binary.

來自 temporalio 的更多技能

temporal-cloud-setup
temporalio
為使用者端到端設定 Temporal Cloud 並在其上執行範例工作流程。當使用者想要設定 Temporal Cloud、開始使用…時使用。
official
temporal-developer
temporalio
開發、除錯及管理跨 Python、TypeScript、Go、Java、.NET 和 Ruby 的 Temporal 應用程式。當使用者正在建構工作流程、活動或…時使用。
official
temporal-cloud
temporalio
修復 Temporal Cloud 連線、驗證與設定問題。適用於使用者遇到登入失敗、無法連線至 Cloud、出現 x509/TLS 錯誤、命名空間或…
official
temporal-observability
temporalio
Instrument, collect, query, and alert on Temporal metrics across Temporal Cloud and self-hosted deployments. Covers Cloud OpenMetrics endpoint, SDK metrics,…
official
temporal-cloud-setup
temporalio
為使用者端到端設定 Temporal Cloud 並在其上執行範例工作流程。當使用者想要設定 Temporal Cloud、開始使用…時使用。
official
temporal-developer
temporalio
當使用者要求「建立 Temporal 工作流程」、「撰寫 Temporal 活動」、「除錯卡住的工作流程」、「修復非確定性錯誤」…時,應使用此技能。
official
temporal-workflow-design-critic
temporalio
針對 Temporal 工作流程設計的正確性、生產就緒度及最佳實務合規性進行評論、審計或評分。當被要求審查 Temporal… 時使用。
official
temporal-developer
temporalio
跨 Python、TypeScript、Go、Java 與 .NET 開發、除錯及管理 Temporal 應用程式。當使用者正在建構工作流程、活動或工作者時使用…
official