Run build given the following skyuxconfig object.
Starts server and resolves when ready.
1727
function prepareBuild(config) {

  function serve(exitCode) {

    // Save our exitCode for testing
    _exitCode = exitCode;

    // Reset skyuxconfig.json
    resetConfig();

    return server.start('unused-root', tmp)
      .then(port => browser.get(`https://localhost:${port}/dist/`));
  }

  writeConfig(config);

  return new Promise((resolve, reject) => {
    rimrafPromise(path.join(tmp, 'dist'))
      .then(() => exec(`node`, [cliPath, `build`, `--logFormat`, `none`], cwdOpts))
      .then(serve)
      .then(resolve)
      .catch(err => reject(err));
  });
}
310369
def runserver(**config_kwargs):
    
    # force a full reload in sub processes so they load an updated version of code, this must be called only once
    set_start_method('spawn')

    config = Config(**config_kwargs)
    config.import_app_factory()
    loop = asyncio.get_event_loop()

    loop.run_until_complete(check_port_open(config.main_port, loop))

    aux_app = create_auxiliary_app(
        static_path=config.static_path_str,
        static_url=config.static_url,
        livereload=config.livereload,
    )

    main_manager = AppTask(config, loop)
    aux_app.on_startup.append(main_manager.start)
    aux_app.on_shutdown.append(main_manager.close)

    if config.static_path:
        static_manager = LiveReloadTask(config.static_path, loop)
        logger.debug('starting livereload to watch %s', config.static_path_str)
        aux_app.on_startup.append(static_manager.start)
        aux_app.on_shutdown.append(static_manager.close)

    url = 'http://{0.host}:{0.aux_port}'.format(config)
    logger.info('Starting aux server at %s ◆', url)

    if config.static_path:
        rel_path = config.static_path.relative_to(os.getcwd())
        logger.info('serving static files from ./%s/ at %s%s', rel_path, url, config.static_url)

    return aux_app, config.aux_port, loop, AuxAccessLogger
23865
def run(self):
        
        self.configure()
        self.setup()
        self.update_dir()
        db.init_db(drop_all=True)
        self.out.log("Starting up the server...")
        config = get_config()
        with HerokuLocalWrapper(config, self.out, verbose=self.verbose) as wrapper:
            try:
                self.execute(wrapper)
            except KeyboardInterrupt:
                pass
            finally:
                os.chdir(self.original_dir)
                self.cleanup()
628813
function startServerCmd(options) {
    var deferred = Q.defer()
    var config

    try {
        options = loadOptions(options)
        config = buildConfigFromOptions(options)
        buildServer(config).then(onServerBuilt, onServerBuildFailed)
    } catch(error) {
        deferred.reject(error)
    }

    return deferred.promise


    function onServerBuilt(server) {
        server.start().then(deferred.resolve, onServerStartFailed)
    }

    function onServerBuildFailed(error) {
        var msg = (error && error.message) || 'of no good reason'
        console.error('failed to build server because ' + msg)
        deferred.reject(error)
    }

    function onServerStartFailed(error) {
        var msg = (error && error.message) || 'of no good reason'
        console.error('failed to start server becaue ' + msg)
        deferred.reject(error)
    }
}
648433
def run(cls):
        
        if not all(v is None for v in cls._services.values()):
            cls._set_host_id()
            cls._setup_logging()
            cls._set_process_name()
            cls._set_signal_handlers()
            cls._start_server()
        else:
            cls._logger.error('No services to host')
993693
def run(self):
        
        print("Development server started on http://%s:%s. \n\nPress Ctrl+C to stop\n" % (
            self.manager.args.addr,
            self.manager.args.port)
              )
        if self.manager.args.server_type == 'falcon':
            self.run_with_falcon()
        elif self.manager.args.server_type == 'tornado':
            self.run_with_tornado()
206315
function start(app) {
    /**
     * Create HTTP server.
     */

    const config = require('./config')();
    port = normalizePort(config.get('port'));
    server = http.createServer(app);

    /**
     * Listen on provided port, on all network interfaces.
     */

    app.set('port', port);
    server.listen(port);
    server.on('error', onError);
    server.on('listening', onListening);

    return server;
}
1249290
def start(debug=False, host='127.0.0.1'):
    
    if debug:
        debug = True
    nago.protocols.httpserver.app.run(debug=debug, host=host)
66925
def run_console
      require 'irb'
      require 'irb/completion'
      require 'pp'
      load_code
      connect_to_database true
      CloudCrowd::Server # Preload server to autoload classes.
      Object.send(:include, CloudCrowd)
      IRB.start
    end
1060593
def run(self):
        
        define("port", default=self.port, help="Run on given port", type=int)
        define("host", default=self.host, help="Run on given host", type=str)
        define("debug", default=self.debug, help="True for development", type=bool)

        parse_command_line()

        print(Fore.GREEN + "Starting Bast Server....")
        print(Fore.GREEN + "Bast Server Running on %s:%s" % (options.host, options.port))

        application = Application(self.handler, debug=options.debug)
        server = HTTPServer(application)
        server.listen(options.port, options.host)
        IOLoop.current().start()
201609
function main() {
    const options = queryOptions();
    switch (options.porting) {
        case 'build':
            runBuild(options)
            .catch((reason) => {
                console.error(reason);
                process.exit(1);
            });
            break;
        case 'arrange':
            runArrange(options);
            break;
        case 'rebase':
            runRebase(options);
            break;
        case 'clean':
            runClean(options);
            break;
    }
}
443447
def run(self):
    """"""

    if not (self._watchman and self._watchman.is_alive()):
      raise PantsService.ServiceError('watchman is not running, bailing!')

    # Enable watchman for the build root.
    self._watchman.watch_project(self._build_root)

    subscriptions = list(self._handlers.values())

    # Setup subscriptions and begin the main event firing loop.
    for handler_name, event_data in self._watchman.subscribed(self._build_root, subscriptions):
      self._state.maybe_pause()
      if self._state.is_terminating:
        break

      if event_data:
        # As we receive events from watchman, trigger the relevant handlers.
        self.fire_callback(handler_name, event_data)
1150887
public function run()
    {
        $this->logger->info('Initialization...');

        $this->initWebsocketServer();

        if ($this->sandstoneApplication->isPushEnabled()) {
            $this->initPushServer();
        }

        $this->sandstoneApplication->boot();

        $this->logger->info('Bind websocket server', $this->sandstoneApplication['sandstone.websocket.server']);

        if ($this->sandstoneApplication->isPushEnabled()) {
            $this->logger->info('Bind push server', $this->sandstoneApplication['sandstone.push.server']);
        }

        $this->loop->run();
    }
749505
def start_server(self):
        
        if self._server is None:
            self._server = SimpleServer()
            self._server.createPV(prefix=self._options.prefix,
                                  pvdb={k: v.config for k, v in self.interface.bound_pvs.items()})
            self._driver = PropertyExposingDriver(interface=self.interface,
                                                  device_lock=self.device_lock)
            self._driver.process_pv_updates(force=True)

            self.log.info('Started serving PVs: %s',
                          ', '.join((self._options.prefix + pv for pv in
                                     self.interface.bound_pvs.keys())))
815768
def run(self, build_requests=None, callback=None):
        
        if callback:
            self.callback = callback
        if build_requests:
            self.build_requests = build_requests

        def normalise_requests_err(e):
            try:
                msg = e.message.args[1].strerror
            except:
                try:
                    msg = e.message.args[0]
                except:
                    msg = str(e)
            return msg

        while not self.done:
            try:

                # get the server version info
                if not self.server_version:
                    self.server_version = self.perform_request('version')

                    # if the server supports async mode, use it, as some views may only work in async mode
                    if self.server_version.capabilities and 'async' in self.server_version.capabilities:
                        self.update()
                        self.block = False
                    elif self.supports_blocking:
                        self.block = True
                    else:
                        raise BlockingNotSupportedError("Debugger requires blocking mode")

                if self.block:
                    # synchronous requests
                    self.update()
                else:
                    # async requests, block using a null request until the debugger stops again
                    res = self.perform_request('null', block=True)
                    if res.is_success:
                        self.server_version = res
                        self.update()
            except ConnectionError as e:
                self.callback(error='Error: {}'.format(normalise_requests_err(e)))
                self.server_version = None
                time.sleep(1)
129057
def run(self):
    """"""
    compiler = new_compiler(compiler=self.compiler)
    if compiler.compiler_type == "msvc":
      self.define = [
          ("UNICODE", ""),
      ]

    else:
      command = "sh configure --disable-shared-libs"
      output = self._RunCommand(command)

      print_line = False
      for line in output.split("\n"):
        line = line.rstrip()
        if line == "configure:":
          print_line = True

        if print_line:
          print(line)

      self.define = [
          ("HAVE_CONFIG_H", ""),
          ("LOCALEDIR", "\"/usr/share/locale\""),
      ]

    build_ext.run(self)
1330837
async def start(self, **kwargs):
        """"""
        zeroconf = kwargs['zeroconf']
        self._name = kwargs['name']
        self._pairing_guid = kwargs.get('pairing_guid', None) or \
            self._generate_random_guid()

        self._web_server = web.Server(self.handle_request, loop=self._loop)
        self._server = await self._loop.create_server(
            self._web_server, '0.0.0.0')

        # Get the allocated (random port) and include it in zeroconf service
        allocated_port = self._server.sockets[0].getsockname()[1]
        _LOGGER.debug('Started pairing web server at port %d', allocated_port)

        self._setup_zeroconf(zeroconf, allocated_port)