Skip to content

Instantly share code, notes, and snippets.

@gjaldon
Created November 12, 2016 09:59
Show Gist options
  • Save gjaldon/2516c846ee4f0410825872c0c5f0fde1 to your computer and use it in GitHub Desktop.
Save gjaldon/2516c846ee4f0410825872c0c5f0fde1 to your computer and use it in GitHub Desktop.
open Opium.Std
let print_param = put "/hello/:name" (fun req ->
let name = param req "name" in
`String ("Hello " ^ name) |> respond')
let _ =
App.empty
|> print_param
|> App.run_command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment