Skip to content

Instantly share code, notes, and snippets.

@johnhamelink
Last active December 15, 2015 12:44
Show Gist options
  • Select an option

  • Save johnhamelink/37d93d5439d43bd28d51 to your computer and use it in GitHub Desktop.

Select an option

Save johnhamelink/37d93d5439d43bd28d51 to your computer and use it in GitHub Desktop.
defmodule TestMaruProject.API do
use Maru.Router
if Mix.env == :dev do
plug MaruSwagger, at: "/swagger", pretty: true
end
mount TestMaruProject.API.V2.Base
end
defmodule TestMaruProject.API.V2.Base do
use Maru.Router
version "v2"
mount TestMaruProject.API.V2.Testing
end
defmodule TestMaruProject.API.V2.Testing do
use Maru.Router
desc "Testing"
get "testing" do
conn |>
json(%{hello: :world})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment