Run the dev appserver in async mode.
764473
public void runAsync(int startSuccessTimeout) throws MojoExecutionException {
    runMojo
        .getLog()
        .info("Waiting " + startSuccessTimeout + " seconds for the Dev App Server to start.");
    try {
      runMojo
          .getAppEngineFactory()
          .devServerRunAsync(startSuccessTimeout)
          .run(configBuilder.buildRunConfiguration(processServices(), processProjectId()));
    } catch (AppEngineException ex) {
      throw new RuntimeException(ex);
    }
    runMojo.getLog().info("Dev App Server started.");
    runMojo.getLog().info("Use the 'mvn appengine:stop' command to stop the server.");
  }
842484
def server(port):
    

    header("Serving application in development mode ... ")
    print("")
    print("- Port: %s" % port)
    print("")
    cwd_to_sys_path()
    application.app.run(debug=True, host='0.0.0.0', port=port)
1068257
def run(self):
        """"""
        self.logger.info("Running main flask method on port " +
                         str(self.settings['FLASK_PORT']))
        self.app.run(host='0.0.0.0', port=self.settings['FLASK_PORT'])
1037205
def run_simple(app, *, host="127.0.0.1", port=500,
               debug=True, autoreload=True, **kwargs):
    
    kwargs.setdefault("use_evalex", debug)
    return serving.run_simple(host, port, app,
                              use_debugger=debug,
                              use_reloader=autoreload,
                              **kwargs)
936536
def run(self):
        """"""
        executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
        loop = asyncio.get_event_loop()
        loop.run_until_complete(self._run_loop(executor))
        self._log.info('Shutting down...')
        executor.shutdown()
950929
def run(host='0.0.0.0', port=5000, reload=True, debug=True):
    
    from werkzeug.serving import run_simple

    app = bootstrap.get_app()
    return run_simple(
        hostname=host,
        port=port,
        application=app,
        use_reloader=reload,
        use_debugger=debug,
    )
1162240
def run(self, host='0.0.0.0', port=8080):
        
        waitress.serve(self.app, host=host, port=port)
731537
function startDevServer (directory, port = 3000) {
  let url
  const app = express()
  const { reload } = reloadServer(app)
  let preview = ''

  app.get('/', (req, res) => res.send(preview))
  app.use(express.static(directory))

  function update ({ html, errors, metadata }) {
    let status = errors.length ? chalk.red('failed') : chalk.green('success')
    preview = errors.length
      ? buildErrorPage(errors)
      : html.replace('</body>', '<script src="/reload/reload.js"></script></body>')

    renderCLI({ url, status, time: metadata.time, size: metadata.size })
    reload()
  }

  return new Promise((resolve, reject) => {
    getPort({ port }).then((availablePort) => {
      url = `http://localhost:${availablePort}`

      app.listen(availablePort, () => resolve({ update, url, app }))
    })

    process.on('uncaughtException', reject)
  })
}
213259
def serve(self):
        """"""
        while self.ready:
            try:
                self.tick()
            except (KeyboardInterrupt, SystemExit):
                raise
            except Exception:
                self.error_log(
                    'Error in HTTPServer.tick', level=logging.ERROR,
                    traceback=True,
                )

            if self.interrupt:
                while self.interrupt is True:
                    # Wait for self.stop() to complete. See _set_interrupt.
                    time.sleep(0.1)
                if self.interrupt:
                    raise self.interrupt
1197627
async def running(self):
        """"""
        try:
            async with self._session.ws_connect(self._url) as ws:
                self.state = STATE_RUNNING
                async for msg in ws:
                    if msg.type == aiohttp.WSMsgType.TEXT:
                        ensure_future(self._async_callback(
                            json.loads(msg.data)))
                        _LOGGER.debug('Websocket data: %s', msg.data)
                    elif msg.type == aiohttp.WSMsgType.CLOSED:
                        break
                    elif msg.type == aiohttp.WSMsgType.ERROR:
                        break
        except aiohttp.ClientConnectorError:
            if self.state != STATE_STOPPED:
                self.retry()
        except Exception as err:
            _LOGGER.error('Unexpected error %s', err)
            if self.state != STATE_STOPPED:
                self.retry()
        else:
            if self.state != STATE_STOPPED:
                self.retry()
1337643
function startAppServer(fn) {
  if (!checkingAppServerPort) {
    server = fork(appServer.file, [], appServer.options);
    server.on('exit', code => {
      checkingAppServerPort = false;
      server.removeAllListeners();
      server = null;
      fn(Error('failed to start server'));
    });

    checkingAppServerPort = true;
    waitForPortOpen(appServer.port, fn);
  }
}
78221
async function start() {
  try {
    await server.register({ plugin: hapijsStatusMonitor });
    await server.start();
  }
  catch (err) {
    console.log(err);
    process.exit(1);
  }

  console.log('Server running at:', server.info.uri);
}
1341383
def server(port):
    """"""
    args = ['python', 'manage.py', 'runserver']
    if port:
        args.append(port)
    run.main(args)
1007631
def run(self):
        """"""
        event_handler = Handler()
        threads = []
        paths = [os.path.join(cwd, "content"), os.path.join(cwd, "templates")]

        for i in paths:
            targetPath = str(i)
            self.observer.schedule(event_handler, targetPath, recursive=True)
            threads.append(self.observer)

        self.observer.start()

        try:
            while True:
                time.sleep(5)
        except:
            self.observer.stop()
            print("\nObserver stopped.")

        self.observer.join()
679152
def run(self, host='localhost', port=1234):
        
        # Setup loop
        loop = asyncio.get_event_loop()
        coro = asyncio.start_server(self._handle, host, port, loop=loop)
        try:
            server = loop.run_until_complete(coro)
        except Exception as e:
            self._logger.error('Could not launch server: {}'.format(e))
            return

        # Run the server
        self._logger.info('Serving on {}'.format(server.sockets[0].getsockname()))
        try:
            loop.run_forever()
        except KeyboardInterrupt:
            pass

        # Close the server
        server.close()
        loop.run_until_complete(server.wait_closed())
        loop.close()
1054617
def run():
    """"""
    _parser_options()
    set_verbose(args["verbose"])
    
    if _check_global_settings():
        _load_db()
    else:
        exit(-1)

    #Check the server configuration against the script arguments passed in.
    _setup_server()

    if args["rollback"]:
        _server_rollback()
        okay("The server rollback appears to have been successful.")
        exit(0)

    _server_enable()    
    _list_repos()
    _handle_install()
    
    #This is the workhorse once a successful installation has happened.
    _do_cron()
777205
async def start(self):
        
        logging.info('Starting server, listening on %s.', self.port)
        runner = web.AppRunner(self)
        await runner.setup()
        site = web.TCPSite(runner, '', self.port)
        await site.start()