MCPcopy Create free account
hub / github.com/socketstream/socketstream / start

Function start

lib/socketstream.js:227–248  ·  view source on GitHub ↗

* @ngdoc function * @name start * @param {HTTPServer} server Instance of the server from the http module * @description * Starts the development or production server

()

Source from the content-addressed store, hash-verified

225 * Starts the development or production server
226 */
227function start() {
228
229 var plan = tasks.plan(arguments);
230
231 // Hook in streaming if called with HTTP server
232 if (plan.httpServer) {
233 // depr
234 api.log.error('The API has changed you can no longer create the HTTP server yourself.');
235 }
236
237 load();
238 tasks.defaults();
239
240 tasks.start(plan.targets,plan.callback);
241
242 if (!exitRegistered) {
243 process.on('exit', api.unload);
244 exitRegistered = true;
245 }
246
247 return api;
248}
249
250/**
251 * @ngdoc function

Callers

nothing calls this directly

Calls 1

loadFunction · 0.85

Tested by

no test coverage detected