Hi there.
I’m currently written a Kotlin DSL for the https://github.com/membrane/service-proxy.
While the DSL looks nice, it bothers me that I need to wrap it in a main function.
fun main(args: Array<String>) { router { serviceProxy(name = "names", port = 2000) { path(regExp = false, value = "/(rest)?names.*")
rewriter {
map(from = “^/names/(.*)”, to = “/restnames/name</span>.groovy</span>?name=$1”)
}
target(host = “thomas-bayer.com”, port = 80)
}
}
}
Is there some way to get rid of the main function? I'm basically looking for a way to execute the DSL as a script,