Skip to content

Instantly share code, notes, and snippets.

@wookay
Created June 23, 2019 06:11
Show Gist options
  • Save wookay/0dd13a45bb878bfdffb6cf21acabcb95 to your computer and use it in GitHub Desktop.
Save wookay/0dd13a45bb878bfdffb6cf21acabcb95 to your computer and use it in GitHub Desktop.
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