alepha@docs:~/docs/packages/alepha/api$
cat parameters.md
1 min read
Last commit:

#Alepha - Api Parameters

#Installation

Part of the alepha package. Import from alepha/api/parameters.

npm install alepha

#Overview

Provides versioned configuration management for Alepha applications.

Features:

  • Type-safe, versioned configuration with $config primitive
  • Schema validation with auto-migration detection
  • Scheduled activation (FUTURE, NEXT, CURRENT, EXPIRED statuses)
  • PostgreSQL persistence with full version history
  • Cross-instance synchronization via topic
  • Tree view support via dot-notation naming
  • REST API for configuration management
  • Automatic activation scheduler
ts
 1import { Alepha } from "alepha"; 2import { AlephaApiParameters } from "alepha/api/parameters"; 3  4const alepha = Alepha.create(); 5alepha.with(AlephaApiParameters); 6  7// Then use $config in your services: 8class AppConfig { 9  features = $config({10    name: "app.features.flags",11    schema: t.object({12      enableBeta: t.boolean(),13      maxUploadSize: t.number()14    }),15    default: { enableBeta: false, maxUploadSize: 10485760 }16  });17}
On This Page
No headings found...
ready
mainTypeScript
UTF-8packages_alepha_api_parameters.md