SHOW:
|
|
- or go back to the newest paste.
1 | [<EntryPoint>] | |
2 | - | let main argv = |
2 | + | let main argv = |
3 | let write msg context = | |
4 | msg |> context.Response.Write |> ignore // Write returns Future<T>, which we do not want to wait for | |
5 | context | |
6 | let end context = | |
7 | context.Response.End () |> ignore // End returns Future<T>, which we do not want to wait for | |
8 | ||
9 | Reactor.Loop.Start(); | |
10 | - | Reactor.Http.Server.Create(fun context -> |
10 | + | |
11 | - | context.Response.Write("hello") |> ignore |
11 | + | |
12 | - | context.Response.End() |> ignore |
12 | + | |
13 | , 2000.0) | |
14 | ||
15 | (* testing *) | |
16 | Reactor.Http.Server.Create(fun context -> | |
17 | context | |
18 | |> write "Hello" | |
19 | |> end | |
20 | ).Listen(5000) | |
21 | 0 |