Instance Method
run()
Runs the application as a
Service (no signal handling).func run() async throws
Discussion
Use this when embedding the application in your own ServiceGroup:
let serviceGroup = ServiceGroup(
configuration: .init(
services: [.init(service: app)],
gracefulShutdownSignals: [.sigterm, .sigint]
)
)
try await serviceGroup.run()
Blocks until all services (including the HTTP server) have stopped. Graceful shutdown is triggered by the parent task or ServiceGroup.