Skip to content

Commit

Permalink
comment out main function
Browse files Browse the repository at this point in the history
  • Loading branch information
gimlet2 committed Aug 24, 2020
1 parent 9cbdf4e commit b55805c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/kotlin/com/github/gimlet2/kottpd/Server.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import javax.net.ssl.TrustManagerFactory
import kotlin.reflect.KClass
import kotlin.system.exitProcess


/*** Example:
fun main() {
Server().apply {
// staticFiles("/public")
staticFiles("/public")
get("/hello") { _, res -> res.send("Hello") }
get("/test") { _, _ -> throw IllegalStateException("AAA") }
get("/do/.*/smth") { _, res -> res.send("Hello world") }
get("/do/.*/smth") { _, res -> res.send("Hello world") }
post("/data") { req, res -> res.send(req.content, Status.Created) }
before("/hello") { _, res -> res.send("before\n") }
before { _, res -> res.send("ALL before\n") }
Expand All @@ -29,7 +29,7 @@ fun main() {
}.start()
// server.start(9443, true, "./keystore.jks", "password")
}

***/
class Server(val port: Int = (System.getProperty("server.port") ?: "9000").toInt()) {

val threadPool: ExecutorService = Executors.newCachedThreadPool()
Expand Down

0 comments on commit b55805c

Please sign in to comment.