I hereby claim:
- I am withoutclass on github.
- I am withoutclass (https://keybase.io/withoutclass) on keybase.
- I have a public key ASDxPxeGy1p-OqMrfDkQe_-1biAeIKAeuu_IXJMhwzqK3wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/* | |
* Copyright (C) 2016 Square, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
class App : CoroutineVerticle() { | |
suspend override fun start() { | |
... // setup | |
router.post("/ingredientCR").coroutineHandler { ctx -> addIngredientCoroutine(ctx) } | |
awaitResult<HttpServer> { | |
vertx.createHttpServer() | |
.requestHandler(router::accept) | |
.listen(config.getInteger("http.port", 8080), it) | |
} |
class App : CoroutineVerticle() { | |
suspend override fun start() { | |
// Build Vert.x Web router | |
val router = Router.router(vertx) | |
router.post("/ingredient").coroutineHandler { ctx -> addIngredient(ctx) } | |
router.get("/").coroutineHandler { ctx -> ctx.response().end("Hello dude") } | |
// Start the server | |
awaitResult<HttpServer> { | |
vertx.createHttpServer() |