https://github.com/sc0vu/config
Nodejs simple yaml config.
https://github.com/sc0vu/config
config nodejs yaml yarn
Last synced: about 2 months ago
JSON representation
Nodejs simple yaml config.
- Host: GitHub
- URL: https://github.com/sc0vu/config
- Owner: sc0Vu
- License: mit
- Created: 2017-09-22T03:56:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T06:33:11.000Z (over 8 years ago)
- Last Synced: 2025-07-03T23:36:00.136Z (12 months ago)
- Topics: config, nodejs, yaml, yarn
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple yaml config
[](https://travis-ci.org/sc0Vu/config)
[](https://codecov.io/gh/sc0Vu/config)
Nodejs Simple yaml config.
# Install
```
npm install simple-yaml-config
```
# Usage
1. load config
```
const Config = require('simple-yaml-config')
let config = new Config()
config.load('resource uri', options).then((loadedData) => {
// do something after config was loaded
}).catch((err) => {
// do something when error was occured
})
```
2. save config
```
const Config = require('simple-yaml-config')
let config = new Config({
version: 1
})
config.save('file name', options).then(() => {
// do something after config was saved
}).catch((err) => {
// do something when error was occured
})
```
# Test
```
npm test
```
# License
MIT