Skip to content

Instantly share code, notes, and snippets.

@JaniKibichi
Last active January 27, 2022 10:35
Show Gist options
  • Save JaniKibichi/25d09bcbc94887411f06f3825eec27e5 to your computer and use it in GitHub Desktop.
Save JaniKibichi/25d09bcbc94887411f06f3825eec27e5 to your computer and use it in GitHub Desktop.
object Main extends App with LazyLogging with Routes {
// SERVER SET UP
val httpServerFuture: Future[ServerBinding] = Http().bindAndHandle(routes, http.host, http.port)
httpServerFuture.onComplete {
case Success(binding: ServerBinding) =>
logger.info(s"Akka Server is up and bound to ${binding.localAddress}")
case Failure(exception) =>
logger.info(
s"Akka http server failed to start with error ${exception.printStackTrace()}"
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment