Skip to content

Support multiple stages / connections per app #34

Description

@damusix

Problem

Currently a noorm app maps to a single database connection. Real-world apps need dev/staging/prod environments, and some need multiple databases within the same stage.

Proposal

  • Stage list: NOORM_STAGES=dev,prod to declare available stages
  • Stage-prefixed env vars: NOORM_<STAGE>_* convention (e.g. NOORM_DEV_HOST, NOORM_PROD_HOST, NOORM_PROD_PORT)
  • Uses makeNestedConfig from logosdx to parse prefixed env vars into per-stage config objects automatically

Scope

This is a design-level change that touches:

  • Config resolution / env-var parsing
  • SDK context creation (createContext)
  • CLI/TUI surface (stage selector, per-stage operations)
  • Potentially .noorm/state/ structure (per-stage state files)

Needs a design pass before implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions