blob: 00b4a2735f94f187dcae9d9323656b87fc1e7e77 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
}
}
|