Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
fix(server): start HttpApi explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed Jan 11, 2016
1 parent e031158 commit 7cd9887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ final class HttpApi(_system: ActorSystem) extends Extension {
}
}

HttpApiFrontend.start(system.settings.config)

val authenticator: AsyncAuthenticator[Boolean] = {
case p @ Credentials.Provided(_)
for {
Expand All @@ -51,6 +49,9 @@ final class HttpApi(_system: ActorSystem) extends Extension {

val adminAuthenticator: AsyncAuthenticator[Unit] =
authenticator andThen (_ map (isAdminOpt if (isAdminOpt.isDefined) Some(()) else None))

def start(): Unit =
HttpApiFrontend.start(system.settings.config)
}

object HttpApi extends ExtensionId[HttpApi] with ExtensionIdProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ final case class ActorServerBuilder(defaultConfig: Config = ConfigFactory.empty(
Frontend.start(serverConfig)

system.log.debug("Starting Http Api")
HttpApi(system)
HttpApi(system).start()

ActorServer(system)
} catch {
Expand Down

0 comments on commit 7cd9887

Please sign in to comment.