Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9
Minimal composable server framework for Riot
License
suri-framework/trail
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Trail is a minimalistic, composable framework for building HTTP/WebSocketservers, inspired byPlug & [WebSock][websock]. It provides its userswith a small set of abstractions for buildingtrails that can be assembled tohandle a request.
To create a Trail, you can use the syntaxTrail.[fn1;fn2;fn3;...], where eachfunction takes a connection object and an arbitrary context, to produce a newconnection object.
For example:
openTrailopenRouterlet endpoint= [ use (moduleLogger)Logger.(args~level:Debug()); router [ socket"/ws" (moduleMy_handler)(); get"/" (funconn ->Conn.send_response`OK {%b|"hello world"|} conn); scope"/api" [ get"/version" (funconn ->Conn.send_response`OK {%b|"none"|} conn); ]; ]; ]
About
Minimal composable server framework for Riot
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.