Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samueleaton/wiz
The F# web framework designed for clarity and speed
https://github.com/samueleaton/wiz
asp-net dotnet fsharp http http-server web-framework webserver wiz
Last synced: 3 months ago
JSON representation
The F# web framework designed for clarity and speed
- Host: GitHub
- URL: https://github.com/samueleaton/wiz
- Owner: samueleaton
- License: apache-2.0
- Created: 2021-01-31T00:53:12.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-11T23:52:08.000Z (almost 4 years ago)
- Last Synced: 2024-10-25T01:32:06.437Z (4 months ago)
- Topics: asp-net, dotnet, fsharp, http, http-server, web-framework, webserver, wiz
- Language: F#
- Homepage: https://wiz.run
- Size: 27.3 KB
- Stars: 38
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Wiz](assets/wiz-banner.png)
*The F# web framework designed for clarity and speed*
→ [https://wiz.run](https://wiz.run)
```fsharp
open Wiz.Server
open Wiz.Route
open Wiz.Contextlet handler ctx =
ctx |> sendText "Hello, World"genServer()
|> setRoutes [get "/" handler]
|> run
```
## Install
Via the .Net CLI:
```bash
dotnet add package Wiz
```## Example
Here is a fully functional server with 2 routes:
```fsharp
module Program
open Wiz.Server
open Wiz.Route
open Wiz.Context///////////////////////////
// define route handlers
///////////////////////////
let handleHome ctx =
ctx
|> sendText "Show me some magic!"let handleSpell ctx =
ctx
|> sendText "Abra Kadabra Kalamazoo!"///////////////////////////
// map routes to handlers
///////////////////////////
let routes = [
get "/" handleHome
get "/spell" handleSpell
][]
let main args =
genServer()
|> setRoutes routes
|> run
```## About Wiz
Wiz is the result of attentively designing what an F# HTTP server API should look like, and then building that API.
Wiz's goal is to make it *SO* easy to interface with ASP.NET that its the most developer-friendly HTTP framework in all of .NET. To earn that title, Wiz needs to be well documented, intuitive, easily configurable, and fast as hell.
![Wiz Moon Logo](assets/wiz-icon.png)