{"id":15056390,"url":"https://github.com/sinasamavati/leptus","last_synced_at":"2025-04-06T13:10:13.925Z","repository":{"id":10690370,"uuid":"12931626","full_name":"sinasamavati/leptus","owner":"sinasamavati","description":"The Erlang REST framework","archived":false,"fork":false,"pushed_at":"2021-05-13T15:13:36.000Z","size":700,"stargazers_count":346,"open_issues_count":5,"forks_count":50,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-07-29T22:13:26.599Z","etag":null,"topics":["erlang","rest","web"],"latest_commit_sha":null,"homepage":"https://sinasamavati.com/leptus","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinasamavati.png","metadata":{"files":{"readme":"README.org","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-18T18:47:25.000Z","updated_at":"2024-07-29T22:13:26.599Z","dependencies_parsed_at":"2022-08-07T06:00:20.617Z","dependency_job_id":null,"html_url":"https://github.com/sinasamavati/leptus","commit_stats":null,"previous_names":["s1n4/leptus"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinasamavati%2Fleptus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinasamavati%2Fleptus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinasamavati%2Fleptus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinasamavati%2Fleptus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinasamavati","download_url":"https://codeload.github.com/sinasamavati/leptus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erlang","rest","web"],"created_at":"2024-09-24T21:50:34.834Z","updated_at":"2025-04-06T13:10:13.898Z","avatar_url":"https://github.com/sinasamavati.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"* Leptus\n\n  Leptus is an Erlang REST framework that runs on top of Cowboy web server.\n\n  Leptus simplifies creating RESTful APIs in Erlang.\n\n** Requirements\n\n   - Erlang/OTP 18 or newer\n   - [[https://github.com/ninenines/cowboy][Cowboy 2.4.0]]\n   - [[https://github.com/davisp/jiffy][Jiffy 0.15.2]]\n\n** Installation\n\n   Clone it, and run ~make~. Or add it to your rebar configuration.\n\n   #+BEGIN_SRC erlang\n   {deps, [\n           {leptus, \".*\", {git, \"git://github.com/sinasamavati/leptus.git\", {branch, \"master\"}}}\n          ]}.\n   #+END_SRC\n\n** Quick Example\n\n   #+BEGIN_SRC erlang\n   -module(hello).\n   -compile({parse_transform, leptus_pt}).\n\n   %% leptus callbacks\n   -export([init/3]).\n   -export([get/3]).\n   -export([terminate/4]).\n\n   init(_Route, _Req, State) -\u003e\n       {ok, State}.\n\n   get(\"/\", _Req, State) -\u003e\n       {\u003c\u003c\"Hello, leptus!\"\u003e\u003e, State};\n   get(\"/hi/:name\", Req, State) -\u003e\n       Status = ok,\n       Name = cowboy_req:binding(name, Req),\n       Body = #{\u003c\u003c\"say\"\u003e\u003e =\u003e \u003c\u003c\"Hi\"\u003e\u003e, \u003c\u003c\"to\"\u003e\u003e =\u003e Name},\n       {Status, Body, State}.\n\n   terminate(_Reason, _Route, _Req, _State) -\u003e\n       ok.\n   #+END_SRC\n\n   #+BEGIN_SRC\n   $ erl -pa ebin deps/*/ebin\n   #+END_SRC\n\n   #+BEGIN_SRC erlang\n   1\u003e c(hello).\n   2\u003e leptus:start_listener(http, [{'_', [{hello, undefined_state}]}]).\n   Leptus started on http://127.0.0.1:8080\n   #+END_SRC\n\n   #+BEGIN_SRC\n   $ curl localhost:8080/hi/Leptus\n   {\"say\":\"Hi\",\"to\":\"Leptus\"}\n   #+END_SRC\n\n** Features\n\n   - Supports ~GET~, ~PUT~, ~POST~ and ~DELETE~ HTTP methods\n   - Can respond in plain text or JSON\n   - Supports basic authentication\n   - Can be upgraded while it's running (no stopping is required)\n   - Supports HTTPS\n   - Provides a simple way for dealing with Cross-Origin Resource Sharing\n\n** Documentation\n\n   Please refer to [[https://sinasamavati.com/leptus][https://sinasamavati.com/leptus]].\n\n** Support\n\n   - [[https://github.com/sinasamavati/leptus/issues][Issue tracker]]\n   - #leptus IRC channel on Freenode\n   - [[https://groups.google.com/group/leptus][leptus]] mailing-list on Google Groups\n\n** License\n\n   MIT, see LICENSE file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinasamavati%2Fleptus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinasamavati%2Fleptus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinasamavati%2Fleptus/lists"}