Popularity
6.7
Stable
Activity
0.0
Declining
79
9
22
Monthly Downloads: 11
Programming language: Erlang
License: MIT License
Tags:
Frameworks
Latest version: v5.10
rest alternatives and similar packages
Based on the "Frameworks" category.
Alternatively, view rest alternatives based on common mentions on social networks and blogs.
-
RIG
Create low-latency, interactive user experiences for stateless microservices. -
placid
A REST toolkit for building highly-scalable and fault-tolerant HTTP APIs with Elixir -
Flowbite
An open-source UI component library built with Tailwind CSS and compatible with Phoenix/Elixir.
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of rest or a related project?
Popular Comparisons
README
REST: framework with typed JSON
Features and Goals
- Fastest possibe Record <-> Proplists transformations
- Smallest REST framework in the world
- ETS/KVS/Any storage selection by scaffolding
We've achived first goal by providing parse_transform code generation for tuple transformations. And second requirement was achieved by not including routing bullshit and other uncertain features.
Usage
Just plug REST endpoint directly to your Cowboy router:
{"/rest/:resource", rest_cowboy, []},
{"/rest/:resource/:id", rest_cowboy, []},
Module
Sample REST service implementation:
-module(users).
-behaviour(rest).
-compile({parse_transform, rest}).
-include("users.hrl").
-export([init/0, populate/1, exists/1, get/0, get/1, post/1, delete/1]).
-rest_record(user).
init() -> ets:new(users, [public, named_table, {keypos, #user.id}]).
populate(Users) -> ets:insert(users, Users).
exists(Id) -> ets:member(users, wf:to_list(Id)).
get() -> ets:tab2list(users).
get(Id) -> [User] = ets:lookup(users, wf:to_list(Id)), User.
delete(Id) -> ets:delete(users, wf:to_list(Id)).
post(#user{} = User) -> ets:insert(users, User);
post(Data) -> post(from_json(Data, #user{})).
Usage
$ curl -i -X POST -d "id=vlad" localhost:8005/rest/users
$ curl -i -X POST -d "id=doxtop" localhost:8005/rest/users
$ curl -i -X GET localhost:8005/rest/users
$ curl -i -X PUT -d "id=5HT" localhost:8005/rest/users/vlad
$ curl -i -X GET localhost:8005/rest/users/5HT
$ curl -i -X DELETE localhost:8005/rest/users/5HT
Credits
- Dmitry Bushmelev โ ETS
- Maxim Sokhatsky โ KVS
OM A HUM