Skip to content

CrowdHailer/raxx_api_blueprint

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

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

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published