MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / createHttpsServer

Method createHttpsServer

lib/tasks/server/express-server.js:64–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 }
63
64 createHttpsServer() {
65 if (!fs.existsSync(this.startOptions.sslKey)) {
66 throw new TypeError(
67 `SSL key couldn't be found in "${this.startOptions.sslKey}", ` +
68 `please provide a path to an existing ssl key file with --ssl-key`
69 );
70 }
71
72 if (!fs.existsSync(this.startOptions.sslCert)) {
73 throw new TypeError(
74 `SSL certificate couldn't be found in "${this.startOptions.sslCert}", ` +
75 `please provide a path to an existing ssl certificate file with --ssl-cert`
76 );
77 }
78
79 let options = {
80 key: fs.readFileSync(this.startOptions.sslKey),
81 cert: fs.readFileSync(this.startOptions.sslCert),
82 };
83
84 return this.https.createServer(options, this.app);
85 }
86
87 listen(port, host) {
88 let server = this.httpServer;

Callers 1

setupHttpServerMethod · 0.95

Calls 1

createServerMethod · 0.80

Tested by

no test coverage detected