Created
July 26, 2015 01:12
-
-
Save thedillonb/c9db6f3d543865f1fc79 to your computer and use it in GitHub Desktop.
A very simple F# example using OWIN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open Owin | |
open Microsoft.Owin | |
let doStuff (x:IOwinContext) = | |
x.Response.StatusCode <- 200 | |
x.Response.WriteAsync "Hello!" | |
[<EntryPoint>] | |
let main argv = | |
use app = Hosting.WebApp.Start("http://localhost:4444", fun x -> x.Run(fun y -> doStuff(y))) | |
Console.WriteLine("Lets go!") | |
Console.ReadLine() |> ignore | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment