Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [<EntryPoint>]
- let main argv =
- let write msg context =
- msg |> context.Response.Write |> ignore // Write returns Future<T>, which we do not want to wait for
- context
- let end context =
- context.Response.End () |> ignore // End returns Future<T>, which we do not want to wait for
- Reactor.Loop.Start();
- (* create a interval to tick every now and again. *)
- let interval = Reactor.Interval.Create(fun () ->
- printf "tick\n"
- , 2000.0)
- (* testing *)
- Reactor.Http.Server.Create(fun context ->
- context
- |> write "Hello"
- |> end
- ).Listen(5000)
- 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement