You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trout is a Servant-style routing type API. By using routing types you get
static guarantees about having handled all cases. You also get a lot of stuff
for free, such as type-safe parameters for handlers, and automatically
generated type-safe URIs to endpoints.
The primary use of Trout right now is for Hyper
and the
purescript-hypertrout
server package. There is, however, nothing Hyper-specific about this package.
Usage
bower install --save purescript-trout
This package should get its own proper documentation soon. In the meantime,
see purescript-hypertrout.
API Documentation
This library's API documentation is published on Pursuit.
Changelog
0.12.3
Update for argonaut API changes.
0.12.2
Add Header.
0.12.1
Add ReqBody.
0.12.0
PureScript 0.13 compiler support
Various dependency upgrades
0.11.0
PureScript 0.12 compiler support
Various dependency upgrades
0.10.0
Routes are now named. The following routes are written in the old format,
compatible with 0.9.x:
The route name and the literal route segments are orthogonal; there is no
relation between the name "users" and the segment "users" in the above
routes, as far as Trout is concerned. The name is only used to identify
the route when deriving functionality from the routes, e.g. to obtain a
URI to a specific resource.
0.9.1
Change AltE infix operator to right-associative
0.9.0
Add support for query params
Move content types to Method, instead of in Resource, e.g.
Resource (Get MyThing) JSON becomes Resource (Get MyThing JSON).