Why use neat-config

  • Load from multiple file formats (.env, .json).
  • Load from environment variables.
  • Allows for nested configuration.
  • Type-safe through Zod's or joi's schema validation.
  • Combine many sources into one configuration object.
  • Partial presets through premade configuration fragments.
  • Naming agnostic, use any naming convention.
  • Freeze your configuration, prevent it from being changed at runtime.

Installation

Let's get started with neat-config. First lets install the package.

Yarn
yarn add neat-config
NPM
npm install neat-config