{"id":15647832,"url":"https://github.com/jaredly/reason-simple-server","last_synced_at":"2025-04-30T13:20:53.472Z","repository":{"id":66952860,"uuid":"116349339","full_name":"jaredly/reason-simple-server","owner":"jaredly","description":"A simple server library for native reason","archived":false,"fork":false,"pushed_at":"2018-11-03T17:22:09.000Z","size":8,"stargazers_count":42,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-09T22:08:39.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredly.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-05T06:14:45.000Z","updated_at":"2021-05-20T11:46:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"fca05126-b49a-40b8-9953-270b57e7e5a7","html_url":"https://github.com/jaredly/reason-simple-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Freason-simple-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Freason-simple-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Freason-simple-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Freason-simple-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredly","download_url":"https://codeload.github.com/jaredly/reason-simple-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234564928,"owners_count":18853247,"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":[],"created_at":"2024-10-03T12:21:27.196Z","updated_at":"2025-01-18T20:46:03.367Z","avatar_url":"https://github.com/jaredly.png","language":"OCaml","readme":"# Reason Simple Server\n\nThis is a library for native reason (with bsb-native) that lets you stand up a simple server without too much trouble.\n\n## Basic Server\n\n```\nopen ReasonSimpleServer.Basic.Response;\n\nlet handler = (method, path, headers) =\u003e {\n  switch (method, path) {\n  | (\"GET\", \"/\") =\u003e {\n    Ok(\"text/plain\", \"All clear boss!\")\n  }\n  | (\"POST\", _) =\u003e Bad(401, \"Can't do that\")\n  | (\"Get\", \"/\") =\u003e Ok(\"text/html\", \"\u003ch1\u003eHowdy\u003c/h1\u003e\")\n  }\n};\n\nReasonSimpleServer.Basic.listen(~port=3451, handler);\n```\n\nThere's lots of features missing, but it's very small and light.\n\n## Static Server\n\n```\nReasonSimpleServer.Static.run(~port=3451, \"./\");\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Freason-simple-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredly%2Freason-simple-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Freason-simple-server/lists"}