How to use the hops-config.https function in hops-config

To help you get started, we’ve selected a few hops-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xing / hops / packages / express / lib / utils.js View on Github external
function defaultCallback(error, server) {
  if (error) {
    console.error(error.stack ? error.stack.toString() : error.toString());
  } else {
    var address = server.address();
    console.log(
      'hops: Server listening at ' +
        url.format({
          protocol: hopsConfig.https ? 'https' : 'http',
          hostname:
            address.address === '0.0.0.0' ? 'localhost' : address.address,
          port: address.port,
          pathname: hopsConfig.basePath,
        })
    );
  }
}
github xing / hops / packages / server / index.js View on Github external
function defaultCallback(error) {
  if (error) {
    console.error(error.stack.toString());
  } else {
    console.log(
      'hops: Server listening at ' +
        url.format({
          protocol: hopsConfig.https ? 'https' : 'http',
          hostname:
            hopsConfig.host === '0.0.0.0' ? 'localhost' : hopsConfig.host,
          port: hopsConfig.port,
          pathname: hopsConfig.basePath,
        })
    );
  }
}
github xing / hops / packages / build-config / sections / dev-server-https.js View on Github external
module.exports = function getHttpsConfig() {
  if (!hopsConfig.https) {
    return false;
  }
  return {
    key: readSSLFile('localhost.ssl.key'),
    cert: readSSLFile('localhost.ssl.crt'),
    ca: readSSLFile('rootca.pem'),
  };
};