Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/michael-spengler/configuration-reader
- Owner: michael-spengler
- Created: 2019-01-19T21:21:27.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-19T21:59:34.000Z (almost 6 years ago)
- Last Synced: 2024-09-17T15:53:19.178Z (about 2 months ago)
- Language: TypeScript
- Size: 59.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.