taxum
    Preparing search index...
    • Serve the router.

      This method of running a service is intentionally simple and only supports the minimally required configuration. If you need to support HTTPS and/or HTTP2, you should create your own listener. In most cases this should not be required, as TLS termination and HTTP2 is usually handled by a reverse proxy in production.

      Parameters

      Returns Promise<void>

      const router = new Router()
      .route("/", get(() => HttpResponse.builder().raw("Hello world!"));

      await serve(router, {
      port: 8080,
      catchCtrlC: true,
      shutdownTimeout: 3000,
      });