Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

hackage.haskell.org : from-env

This package exposes a class FromEnv that works with GHC.Generics to provide a generic way to construct values from environment variables. In many applications you'll have a configuration object holding a connection string to your database, the url of an S3 bucket, you name it. It can be tedious to have to construct this configuration object manually. With this package, you just derive Generic and then create an instance of FromEnv for your configuration type and you're done. Just call fromEnv and you got your configuration. The default behaviour is to convert field names like configS3BucketUrl into environment variables like CONFIG_S3_BUCKET_URL, but it can be overriden by providing a custom instance of FromEnv.

Registry - JSON
purl: pkg:hackage/from-env
Keywords: configuration, library, mit
License: MIT
Latest release: 9 months ago
First release: 10 months ago
Downloads: 122 total
Last synced: 26 days ago

    Loading...
    Readme
    Loading...