From b760a506934fe134222be0a41786f913b53a9008 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Mon, 13 Feb 2017 10:51:56 +0100 Subject: Add sbt-assembly for dotty-bot --- bot/src/dotty/tools/bot/BotServer.scala | 22 ---------------------- bot/src/dotty/tools/bot/Main.scala | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 bot/src/dotty/tools/bot/BotServer.scala create mode 100644 bot/src/dotty/tools/bot/Main.scala (limited to 'bot') diff --git a/bot/src/dotty/tools/bot/BotServer.scala b/bot/src/dotty/tools/bot/BotServer.scala deleted file mode 100644 index 5f38be15b..000000000 --- a/bot/src/dotty/tools/bot/BotServer.scala +++ /dev/null @@ -1,22 +0,0 @@ -package dotty.tools.bot - -import org.http4s.server.{ Server, ServerApp } -import org.http4s.server.blaze._ - -import scalaz.concurrent.Task - -object Main extends ServerApp with PullRequestService { - - val user = sys.env("USER") - val token = sys.env("TOKEN") - - /** Services mounted to the server */ - final val services = prService - - override def server(args: List[String]): Task[Server] = { - BlazeBuilder - .bindHttp(8080, "localhost") - .mountService(services, "/api") - .start - } -} diff --git a/bot/src/dotty/tools/bot/Main.scala b/bot/src/dotty/tools/bot/Main.scala new file mode 100644 index 000000000..00b4a2735 --- /dev/null +++ b/bot/src/dotty/tools/bot/Main.scala @@ -0,0 +1,23 @@ +package dotty.tools.bot + +import org.http4s.server.{ Server, ServerApp } +import org.http4s.server.blaze._ + +import scalaz.concurrent.Task + +object Main extends ServerApp with PullRequestService { + + val user = sys.env("USER") + val token = sys.env("TOKEN") + val port = sys.env("PORT").toInt + + /** Services mounted to the server */ + final val services = prService + + override def server(args: List[String]): Task[Server] = { + BlazeBuilder + .bindHttp(port, "0.0.0.0") + .mountService(services, "/api") + .start + } +} -- cgit v1.2.3