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

Function readSSLandCert

lib/tasks/server/livereload-server.js:30–47  ·  view source on GitHub ↗
(sslKey, sslCert)

Source from the content-addressed store, hash-verified

28}
29
30function readSSLandCert(sslKey, sslCert) {
31 if (!fs.existsSync(sslKey)) {
32 throw new TypeError(
33 `SSL key couldn't be found in "${sslKey}", ` + `please provide a path to an existing ssl key file with --ssl-key`
34 );
35 }
36
37 if (!fs.existsSync(sslCert)) {
38 throw new TypeError(
39 `SSL certificate couldn't be found in "${sslCert}", ` +
40 `please provide a path to an existing ssl certificate file with --ssl-cert`
41 );
42 }
43
44 let key = fs.readFileSync(sslKey);
45 let cert = fs.readFileSync(sslCert);
46 return { key, cert };
47}
48
49const DEFAULT_PREFIX = '/';
50

Callers 2

createServerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…