Skip to main content

YAML

@inversifyjs/config-yaml provides a yamlFile source for YAML configuration files.

Install

npm 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',
});