This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server = Server.make_dispatch(Server.Filter.path(["app1"]), | |
| {~path ...} -> Resource.html("Test", <>This is application 1, with path {List.to_string(path)}</>) | |
) | |
server = Server.make_dispatch(Server.Filter.path(["app2"]), | |
| {~path ...} -> Resource.html("Test", <>This is application 2, with path {List.to_string(path)}</>) | |
) | |
server = Server.simple_dispatch( | |
| {~path ...} -> Resource.html("Test", <>No application, this is {List.to_string(path)}</>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Uri.relative = | |
/**Relative URI*/ | |
{ path : list(string) | |
; fragment : option(string) | |
; query : list((string, string)) | |
} | |
type Server.filter = private(Uri.relative -> option(Uri.relative)) | |
remove_path(path: list(string)): Server.filter = |