Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Minimal composable server framework for Riot

License

NotificationsYou must be signed in to change notification settings

suri-framework/trail

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

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp