Created
June 23, 2019 06:11
-
-
Save wookay/0dd13a45bb878bfdffb6cf21acabcb95 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Bukdu | |
struct RestController <: ApplicationController | |
conn::Conn | |
end | |
function long(c::RestController) | |
sleep(3) | |
render(JSON, 10) | |
end | |
function short(c::RestController) | |
render(JSON, 11) | |
end | |
routes() do | |
get("/long", RestController, long) | |
get("/short", RestController, short) | |
end | |
Bukdu.start(8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment