Looking to dive straight in?
Freya is a modern, purely functional stack for web programming in F#. Familiar functional programming techniques for state and concurrency are combined to give you a consistent and seamless approach to building web applications.
let ok =
freya {
do! Response.statusCode .= Some 200
do! Response.reasonPhrase .= Some "OK" }
The powerful and comprehensive type systems available with Freya help you build safe and composable application components. Types for HTTP and surrounding standards give you the tools you need to make the most of the web.
let scheme_ =
Request.uri_
>-> Uri.scheme_
let isSecure =
freya {
let! scheme = Freya.Optic.get scheme_
return scheme = HTTPS }
The Freya Machine abstraction gives you an amazingly powerful and functional approach to build HTTP applications. Build complex HTTP applications from smaller, composable, re-usable elements.
let users =
freyaMachine {
methods [ GET; OPTIONS; POST ]
availableMediaTypes MediaType.json
doPost createUser
handleOk listUsers }
Ready to give Freya a try? You could be up and running in minutes using the dotnet CLI:
dotnet new --install Freya.Template::*
dotnet new freya
Routing based on flexible and relevant web standards — URI Templates — allows you to create fast and accurate routing with a consistent data model, and re-use routes for matching, URI generation and more.
let routes =
freyaRouter {
route GET "/" home
resource "/api/users" users
resource "/api/users/{id}" user }
Design to support building abstractions at successviely higher levels enables building complex applications at the right level of detail and control. Build your own abstractions to boost your productivity.
let cors =
freyaMachine {
cors
corsEnabled true
corsMethods [ GET; PUT ] }
A basis on open standards (especially community driven) enables Freya to be compatible with many frameworks and servers. Choose the best tool for specific tasks, make the most of the web.
let frameworks =
[ "asp.net"; "suave"; .. ]
let servers =
[ "kestrel"; "iis"; "katana"; "suave"; .. ]
Still need more convincing? Come and chat about whether Freya is right for you...