mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-02-01 02:03:18 -05:00
Refactor server, move private method to bottom.
This commit is contained in:
@@ -93,15 +93,15 @@ rm.get("/app/alive/:version") { req ->
|
||||
req.response.end template.toString()
|
||||
}
|
||||
|
||||
private addPlainTextHeader(req){
|
||||
req.response.putHeader("Content-Type", "text/plain")
|
||||
}
|
||||
|
||||
def port = System.getenv('PORT') ?: 8080
|
||||
def host = System.getenv('PORT') ? '0.0.0.0' : 'localhost'
|
||||
println "Starting vertx on $host:$port"
|
||||
vertx.createHttpServer().requestHandler(rm.asClosure()).listen(port as int, host)
|
||||
|
||||
private addPlainTextHeader(req){
|
||||
req.response.putHeader("Content-Type", "text/plain")
|
||||
}
|
||||
|
||||
private buildCsv(list){
|
||||
if(!list) return ""
|
||||
def csv = ''
|
||||
|
||||
Reference in New Issue
Block a user