Route requests based on an API Blueprint
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib/raxx
src
test
.formatter.exs
.gitignore
.travis.yml
LICENSE
README.md
mix.exs
mix.lock

README.md

Raxx.ApiBlueprint

Raxx middleware for routing requests based on an API Blueprint.

Hex pm Build Status License

Getting started

Define a blueprint for your application.

FORMAT: 1A

# Messages [/messages]
## Create a message [POST]

lib/my_app/www.apib

Use the Raxx.ApiBlueprint in a Raxx.Server module.

defmodule MyApp.WWW do
  use Raxx.Server
  use Raxx.ApiBlueprint, "./www.apib"
end

lib/my_app/www.ex

Add controller modules for each action in the blueprint. Controller modules are just another Raxx.Server

defmodule MyApp.WWW.CreateAMessage do
  use Raxx.Server

  @impl Raxx.Server
  def handle_request(request, state) do
  # ...
end

lib/my_app/www/create_a_message.ex