mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-24 23:55:46 -05:00
refactor: use utility to parse the yaml config file
This commit is contained in:
parent
d53ce9750b
commit
b804e96f4a
1 changed files with 1 additions and 2 deletions
|
@ -26,7 +26,6 @@ const constants = require('constants');
|
|||
const fs = require('fs');
|
||||
const http = require('http');
|
||||
const https = require('https');
|
||||
const YAML = require('js-yaml');
|
||||
const Path = require('path');
|
||||
const URL = require('url');
|
||||
const server = require('../api/index');
|
||||
|
@ -58,7 +57,7 @@ try {
|
|||
} else {
|
||||
config_path = require('./config-path')();
|
||||
}
|
||||
config = YAML.safeLoad(fs.readFileSync(config_path, 'utf8'));
|
||||
config = Utils.parseConfigFile(config_path);
|
||||
logger.logger.warn({file: config_path}, 'config file - @{file}');
|
||||
} catch (err) {
|
||||
logger.logger.fatal({file: config_path, err: err}, 'cannot open config file @{file}: @{!err.message}');
|
||||
|
|
Loading…
Add table
Reference in a new issue