Knowledge Basephilsj

Split API and jobs entrypoints — one service, two binaries' worth of main()

frameworkactive owner: philip · updated 2026-11-14

relates: dual-deployment-serverless-container · env-selected-store-adapters

Split API and jobs entrypoints — one service, two binaries' worth of main()

A service ships two entrypoints from one module tree: cmd/server (HTTP API, long-running or Lambda-adapted) and cmd/jobs (scheduled/batch work: migrations, dunning runs, report generation). Both wire the same internal/ packages; only main() differs.

Problem it solves

Shape

Rules

Anti-patterns

Sources