lib/config.js
function loadFromFile(filename) {
  var cfg = {}
  Object.assign(
    cfg,
    loadDefault(),
    JSON.parse(fs.readFileSync(filename))
  )

  return cfg
}
function loadFromFile(filename) {
  var cfg = {}
  Object.assign(
    cfg,
    loadDefault(),
    JSON.parse(fs.readFileSync(filename))
  )

  return cfg
}
function loadFromFile ( filename ) { var cfg = { } Object . assign ( cfg , loadDefault ( ) , JSON . parse ( fs . readFileSync ( filename ) ) ) return cfg }
Get HTTP server configuration from JSON file.
@param {string} filename - The JSON filename.
@throws Will throw an error if invalid filename or JSON.
@return {Object} The HTTP server configuration.
Get HTTP server configuration from JSON file .