VaporProvider

public protocol VaporProvider : Provider

A normal service Provider extended with additional life-cycle hooks for Vapor-specific containers.

  • Called before the application runs commands.

    Declaration

    Swift

    func willRun(_ worker: Container) throws -> Future<Void>
  • Called after the application has finished running.

    Note

    This may never happen if the server runs infinitely.

    Declaration

    Swift

    func didRun(_ worker: Container) throws -> Future<Void>