YAML
@inversifyjs/config-yaml provides a yamlFile source for YAML configuration files.
Install
- npm
- yarn
- pnpm
npm install @inversifyjs/config-yaml
yarn add @inversifyjs/config-yaml
pnpm install @inversifyjs/config-yaml
yamlFile
interface YamlFileOptions {
path: string;
}
The file must parse to a YAML object (not an array or scalar).
import { type ConfigSource } from '@inversifyjs/config';
import { yamlFile } from '@inversifyjs/config-yaml';
export const source: ConfigSource = yamlFile({
path: './config.yaml',
});