mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 20:51:25 +03:00
Сервис конфига
This commit is contained in:
parent
08bbb5dd67
commit
a2eccb53e9
4 changed files with 64 additions and 0 deletions
13
config/main.js
Normal file
13
config/main.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
const fs = require('fs');
|
||||
const yaml = require('yaml');
|
||||
|
||||
const config = () => {
|
||||
try {
|
||||
fs.readFileSync('../config.yaml', 'utf-8');
|
||||
} catch { return }
|
||||
|
||||
return yaml.parse(fs.readFileSync('../config.yaml', 'utf-8'));
|
||||
}
|
||||
|
||||
|
||||
module.exports = config;
|
Loading…
Add table
Reference in a new issue