Returns only whitelisted and custom config options
function codeConfig(config) {
  const conf = Object.create(null);
  for (const key in config.custom) {
    conf[key] = config.custom[key];
  }
  for (const key of ['host', 'port', 'backendPort']) {
    conf[key] = config[key];
  }
  return conf;
}