An open API service indexing awesome lists of open source software.

https://github.com/slogsdon/sap

A toolkit for Plug applications to accept and respond to HTTP requests by using a decision tree built with combinators
https://github.com/slogsdon/sap

combinators elixir plug

Last synced: 9 months ago
JSON representation

A toolkit for Plug applications to accept and respond to HTTP requests by using a decision tree built with combinators

Awesome Lists containing this project

README

          

# Sap
[![Build Status](https://img.shields.io/travis/slogsdon/sap.svg?style=flat)](https://travis-ci.org/slogsdon/sap)
[![Coverage Status](https://img.shields.io/coveralls/slogsdon/sap.svg?style=flat)](https://coveralls.io/r/slogsdon/sap)
[![Hex.pm Version](http://img.shields.io/hexpm/v/sap.svg?style=flat)](https://hex.pm/packages/sap)
[![Inline docs](http://inch-ci.org/github/slogsdon/sap.svg?branch=master)](http://inch-ci.org/github/slogsdon/sap)

Sap is a toolkit for Plug applications to accept and respond to HTTP requests by using a decision tree built with combinators.

> **Warning!** Sap is still in progress. The combinators that are available now will work in an application if you were to create one, but this library could use a lot of optimizations. The eventual goal is to minimize any performance hit to as close to 0% as possible.

## Inspiration

This may look familiar to experienced functional programmers. [Suave](http://suave.io) from F# and other similar libraries contain a set of combinators to manipulate route flow and task composition.

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:

1. Add sap to your list of dependencies in `mix.exs`:

def deps do
[{:sap, "~> 0.0.1"}]
end

2. Ensure sap is started before your application:

def application do
[applications: [:sap]]
end

## License

Sap is released under the MIT License.

See [LICENSE](https://github.com/slogsdon/sap/blob/master/LICENSE) for details.