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.
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
NOORM_STAGES=dev,prodto declare available stagesNOORM_<STAGE>_*convention (e.g.NOORM_DEV_HOST,NOORM_PROD_HOST,NOORM_PROD_PORT)makeNestedConfigfrom logosdx to parse prefixed env vars into per-stage config objects automaticallyScope
This is a design-level change that touches:
createContext).noorm/state/structure (per-stage state files)Needs a design pass before implementation.