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

Method createServer

lib/tasks/server/livereload-server.js:119–139  ·  view source on GitHub ↗
(options, Server)

Source from the content-addressed store, hash-verified

117 }
118
119 createServer(options, Server) {
120 let serverOptions = {
121 app: this.app,
122 dashboard: 'false',
123 prefix: DEFAULT_PREFIX,
124 port: options.port,
125 };
126 if (options.ssl) {
127 let { key, cert } = readSSLandCert(options.sslKey, options.sslCert);
128 serverOptions.key = key;
129 serverOptions.cert = cert;
130 }
131 let lrServer = new Server(serverOptions);
132
133 // this is required to prevent tiny-lr from triggering an error
134 // when checking this.server._handle during its close handler
135 // here: https://github.com/mklabs/tiny-lr/blob/d68d983eaf80b5bae78b2dba259a1ad5e3b03a63/lib/server.js#L209
136 lrServer.server = this.httpServer;
137
138 return lrServer;
139 }
140
141 createServerforCustomPort(options, Server) {
142 let instance;

Callers 8

setupMiddlewareMethod · 0.95
setupHttpServerMethod · 0.80
createHttpsServerMethod · 0.80
constructorMethod · 0.80
test-test.jsFile · 0.80
testServerFunction · 0.80

Calls 1

readSSLandCertFunction · 0.85

Tested by

no test coverage detected