morph
morph copied to clipboard
A webframework for Reason and OCaml
## Problem Currently `Morph.Response.t` is a `result(Piaf.Response.t, failure)`. Failure is defined as ```ReasonML type failure = [ Piaf.Error.t | `User(string) | `Server(string) | `Auth(string) ]; ``` It's not entirely clear...
The term `middleware` is already plural so there's no need for the s This would be a breaking change.
https://reason-native-web.github.io/docs/morph/writing-middlewares makes a reference to `Morph.Method.to_string` but this doesn't actually seem to be in the library. With some digging I found that the method information from Piaf is actually hidden...
I had some trouble writing handlers beyond the provided examples. This could be because of the rapid changes seen in the repository. The following never worked ```re req.request.target |> Uri.of_string...
The current pretty printing of routes are very simple so we should be able to do it without Pastel.
We need a way to support websockets. For `httpaf` we can use this to upgrade the connection: https://github.com/anmonteiro/httpaf/blob/fork/lib/httpaf.mli#L640. For `h2` we can just take the TCP connection and do the...
It would be amazing to have some basic logging middleware available out of the box. Maybe not something fully featured like https://github.com/expressjs/morgan but basic logger middleware from https://github.com/reason-native-web/morph-hello-world-pesy-template/blob/master/library/Middleware.re would be...
It would be great to provide `~graphiql: bool` option to `Morph_graphql_server.make` or provide something like `Morph.Response.text(Library.GraphiQL.html, Morph.Response.empty)` available from `Morph_graphql_server` module / cc @cem2ran
Resolves: #25 Basic logger implementation based on https://github.com/expressjs/morgan. Not sure if we want this but seams pretty extensible accepting `Custom(list(token))` format allowing us to add more tokens in the future....