Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/michael-spengler/configuration-reader

Configuration Reader
https://github.com/michael-spengler/configuration-reader

Last synced: 26 days ago
JSON representation

Configuration Reader

Awesome Lists containing this project

README

        

# Configuration Reader
As simple as it gets

# Usage Example
import { ConfigurationReader } from "configuration-reader"
import * as path from "path"

// you can adjust the filename here - remember updating .gitignore
const yourFileName: string = "../template.env"

const configurationReader: ConfigurationReader =
new ConfigurationReader(path.join(__dirname, yourFileName))

const testVariable: string = this.configurationReader.get("testVariable")

console.log(testVariable)

# Example data
Check the file **template.env**. It contains an example entry **testVariable=42**.
Be careful to add your real configuration data to a file which is mentioned in the **.gitignore** file.