How to use the https.createServer function in https

To help you get started, we’ve selected a few https 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 andrewrk / groovebasin / lib / groovebasin.js View on Github external
pend.wait(function() {
        self.httpServer = https.createServer(options, self.app);
        cb();
      });
    }
github andreas-marschke / boomerang-express / app.js View on Github external
function httpsListener(listener) {
  var server = https.createServer({
    key: fs.readFileSync(path.resolve(listener.key)),
    cert: fs.readFileSync(path.resolve(listener.cert))
  }, app);

  server.listen(listener.port, listener.listen, postStartup);
}
github jolira / site-manager / lib / launcher.js View on Github external
return loadKeyCert(sslKey, sslCert, function (err, credentials) {
                    if (err) {
                        return done(err);
                    }

                    result.sslPort = sslPort;
                    result.httpsServer = https.createServer(credentials, result.app);
                    result.httpsServer.on("listening", done);
                    result.httpsServer.on("error", function (err) {
                        return logger.error("https server error", err);
                    });
                    result.httpsServer.listen(sslPort);

                    return done();
                });
            });
github mozilla-services / screenshots / server / src / server.js View on Github external
.then(() => {
    let server;
    let scheme;
    if (httpsCredentials) {
      server = https.createServer(httpsCredentials, app);
      scheme = "https";
    } else {
      server = http.createServer(app);
      scheme = "http";
    }
    server.listen(config.port);
    mozlog.info("server-started", {
      msg: `server listening on ${scheme}://localhost:${config.port}/`
    });
  })
  .catch(err => {

https

https mediation

ISC
Latest version published 10 years ago

Package Health Score

59 / 100
Full package analysis