mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Quit command.
This commit is contained in:
parent
28d6f21c9e
commit
36c48b3000
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,10 @@ class SparkServer(val initCallback: (String) -> List<Project>, val cleanUpCallba
|
||||||
override fun run(port: Int) {
|
override fun run(port: Int) {
|
||||||
Spark.port(port)
|
Spark.port(port)
|
||||||
Spark.get("/ping", { req, res -> "The Kobalt server is up and running" })
|
Spark.get("/ping", { req, res -> "The Kobalt server is up and running" })
|
||||||
|
Spark.get("/quit", {
|
||||||
|
req, res -> println("Kobalt server quitting...")
|
||||||
|
Spark.stop()
|
||||||
|
})
|
||||||
Spark.get("/v0/getDependencies", "application/json", Route { request, response ->
|
Spark.get("/v0/getDependencies", "application/json", Route { request, response ->
|
||||||
val buildFile = request.queryParams("buildFile")
|
val buildFile = request.queryParams("buildFile")
|
||||||
initCallback(buildFile)
|
initCallback(buildFile)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue