Pull conf.yml from server
This commit is contained in:
parent
df3e8e6f13
commit
aeec449dc7
5 changed files with 32 additions and 3 deletions
10
services/get-conf.js
Normal file
10
services/get-conf.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Gets the configuration from conf.yml
|
||||
*/
|
||||
const fs = require('fs');
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
module.exports = () => {
|
||||
const conf = yaml.load(fs.readFileSync('./public/conf.yml', 'utf-8'));
|
||||
return conf;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue