This repository was archived by the owner on Apr 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +43
-13
lines changed
Expand file tree Collapse file tree 4 files changed +43
-13
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ namespace Dos
66
77 public class Startup
88 {
9- public void Configure ( IApplicationBuilder app )
10- {
9+ public void Configure ( IApplicationBuilder app ) =>
1110 app . UseOwin ( x => x . UseNancy ( ) ) ;
12- }
1311 }
1412}
Original file line number Diff line number Diff line change 1- // Learn more about F# at http://fsharp.org
2- namespace Tres
1+ namespace Tres
32
43open Microsoft.AspNetCore .Builder
54open Microsoft.AspNetCore .Hosting
Original file line number Diff line number Diff line change 1- // Learn more about F# at http://fsharp.org
1+ namespace Quatro
22
3- open System
3+ open Freya.Core
4+ open Freya.Machines .Http
5+ open Freya.Routers .Uri .Template
6+ open Microsoft.AspNetCore .Builder
7+ open Microsoft.AspNetCore .Hosting
48
5- [<EntryPoint>]
6- let main argv =
7- printfn " Hello World!"
8- 0 // return an integer exit code
9+ module App =
10+ let hello =
11+ freya {
12+ return Represent.text " Hello World from Freya"
13+ }
14+
15+ let machine =
16+ freyaMachine {
17+ handleOk hello
18+ }
19+
20+ let router =
21+ freyaRouter {
22+ resource " /" machine
23+ }
24+
25+ type Startup () =
26+ member __.Configure ( app : IApplicationBuilder ) =
27+ let freyaOwin = OwinMidFunc.ofFreya ( UriTemplateRouter.Freya router)
28+ app.UseOwin ( fun p -> p.Invoke freyaOwin) |> ignore
29+
30+ [<EntryPoint>]
31+ let main _ =
32+ use host = ( new WebHostBuilder()) .UseKestrel() .UseStartup< Startup>() .Build()
33+ host.Run()
34+ 0
Original file line number Diff line number Diff line change 1212 "dependencies" : {
1313 "Freya" : " 3.0.0-rc01" ,
1414 "Microsoft.AspNetCore.Owin" : " 1.0.0" ,
15- "Microsoft.AspNetCore.Server.Kestrel" : " 1.0.0"
15+ "Microsoft.AspNetCore.Server.Kestrel" : " 1.0.0" ,
16+ "Microsoft.NETCore.Portable.Compatibility" : " 1.0.1"
1617 },
1718 "frameworks" : {
1819 "netcoreapp1.0" : {
2223 "version" : " 1.0.1"
2324 },
2425 "Microsoft.FSharp.Core.netcore" : " 1.0.0-alpha-160831"
25- }
26+ },
27+ "imports" : [
28+ " portable-net45+win8+dnxcore50" ,
29+ " portable-net45+win8" ,
30+ " net452" ,
31+ " dnxcore50"
32+ ]
2633 }
2734 },
2835 "tools" : {
You can’t perform that action at this time.
0 commit comments