Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Route requests based on an API Blueprint

Resources

License

Releases

No releases published

Packages

No packages published