项目作者: reason-native-web

项目描述 :
A webframework for Reason and OCaml
高级语言: Reason
项目地址: git://github.com/reason-native-web/morph.git
创建时间: 2019-09-05T15:16:02Z
项目社区:https://github.com/reason-native-web/morph

开源协议:MIT License

下载


morph

Build Status

A tiny framework for developing HTTP stuff in reason native using Httpaf and H2.

Documentation

https://reason-native-web.github.io/

The documentation is not as fleshed out as it should be, the repos is under heavy development.

Build and run examples

  1. esy install
  2. esy build
  3. esy examples
  4. $(esy examples-path)/hello_world.exe
  5. $(esy examples-path)/with_router.exe
  6. $(esy examples-path)/simple_proxy.exe

Example

Server:

  1. let http_server = Morph_server_http.make();
  2. Morph.start(~servers=[http_server], _request => Http.Response.Ok.make)
  3. |> Lwt_main.run;

Slightly larger example using ocaml-routes: https://github.com/reason-native-web/morph/blob/master/examples/with_router.re

Sponsors

Thank you to @imbsky for sponsoring my work on Morph