This repository was archived by the owner on Apr 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +213
-0
lines changed
Expand file tree Collapse file tree 12 files changed +213
-0
lines changed Original file line number Diff line number Diff line change 1+ namespace Uno
2+ {
3+ using Microsoft . AspNetCore . Hosting ;
4+
5+ public class App
6+ {
7+ public static void Main ( string [ ] args )
8+ {
9+ using ( var host = new WebHostBuilder ( ) . UseKestrel ( ) . UseStartup < Startup > ( ) . Build ( ) )
10+ {
11+ host . Run ( ) ;
12+ }
13+ }
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ namespace Uno
2+ {
3+ using Microsoft . AspNetCore . Builder ;
4+ using Microsoft . AspNetCore . Http ;
5+ using System . Threading . Tasks ;
6+
7+ public class Startup
8+ {
9+ public void Configure ( IApplicationBuilder app ) =>
10+ app . Run ( async context => await context . Response . WriteAsync ( "Hello World from ASP.NET Core" ) ) ;
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ {
2+ "buildOptions" : {
3+ "debugType" : " portable" ,
4+ "emitEntryPoint" : true
5+ },
6+ "dependencies" : {
7+ "Microsoft.AspNetCore.Owin" : " 1.0.0" ,
8+ "Microsoft.AspNetCore.Server.Kestrel" : " 1.0.0"
9+ },
10+ "frameworks" : {
11+ "netcoreapp1.0" : {
12+ "dependencies" : {
13+ "Microsoft.NETCore.App" : {
14+ "type" : " platform" ,
15+ "version" : " 1.0.1"
16+ }
17+ },
18+ "imports" : " dnxcore50"
19+ }
20+ },
21+ "version" : " 1.0.0-*"
22+ }
Original file line number Diff line number Diff line change 1+ namespace Dos
2+ {
3+ using Microsoft . AspNetCore . Hosting ;
4+
5+ public class App
6+ {
7+ public static void Main ( string [ ] args )
8+ {
9+ using ( var host = new WebHostBuilder ( ) . UseKestrel ( ) . UseStartup < Startup > ( ) . Build ( ) )
10+ {
11+ host . Run ( ) ;
12+ }
13+ }
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ namespace Dos . Modules
2+ {
3+ using Nancy ;
4+
5+ public class HomeModule : NancyModule
6+ {
7+ public HomeModule ( ) : base ( )
8+ {
9+ Get ( "/" , _ => "Hello World from Nancy C#" ) ;
10+ }
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ namespace Dos
2+ {
3+ using Microsoft . AspNetCore . Builder ;
4+ using Microsoft . AspNetCore . Hosting ;
5+ using Nancy . Owin ;
6+
7+ public class Startup
8+ {
9+ public void Configure ( IApplicationBuilder app )
10+ {
11+ app . UseOwin ( x => x . UseNancy ( ) ) ;
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ {
2+ "buildOptions" : {
3+ "debugType" : " portable" ,
4+ "emitEntryPoint" : true
5+ },
6+ "dependencies" : {
7+ "Microsoft.AspNetCore.Owin" : " 1.0.0" ,
8+ "Microsoft.AspNetCore.Server.Kestrel" : " 1.0.0" ,
9+ "Nancy" : " 2.0.0-barneyrubble"
10+ },
11+ "frameworks" : {
12+ "netcoreapp1.0" : {
13+ "dependencies" : {
14+ "Microsoft.NETCore.App" : {
15+ "type" : " platform" ,
16+ "version" : " 1.0.1"
17+ }
18+ },
19+ "imports" : " dnxcore50"
20+ }
21+ },
22+ "version" : " 1.0.0-*"
23+ }
Original file line number Diff line number Diff line change 1+ // Learn more about F# at http://fsharp.org
2+ namespace Tres
3+
4+ open Microsoft.AspNetCore .Builder
5+ open Microsoft.AspNetCore .Hosting
6+ open Nancy
7+ open Nancy.Owin
8+
9+ type Startup () =
10+ member this.Configure ( app : IApplicationBuilder ) =
11+ app.UseOwin ( fun x -> x.UseNancy ( fun x -> ()) |> ignore) |> ignore
12+
13+ module App =
14+ [<EntryPoint>]
15+ let main argv =
16+ use host = ( new WebHostBuilder()) .UseKestrel() .UseStartup< Startup>() .Build()
17+ host.Run()
18+ 0
Original file line number Diff line number Diff line change 1+ namespace Tres
2+
3+ open Nancy
4+
5+ type HomeModule () as this =
6+ inherit NancyModule()
7+
8+ do
9+ this.Get( " /" , fun _ -> " Hello World from Nancy F#" )
Original file line number Diff line number Diff line change 1+ {
2+ "buildOptions" : {
3+ "debugType" : " portable" ,
4+ "emitEntryPoint" : true ,
5+ "compilerName" : " fsc" ,
6+ "compile" : {
7+ "includeFiles" : [
8+ " HomeModule.fs" ,
9+ " App.fs"
10+ ]
11+ }
12+ },
13+ "dependencies" : {
14+ "Microsoft.AspNetCore.Owin" : " 1.0.0" ,
15+ "Microsoft.AspNetCore.Server.Kestrel" : " 1.0.0" ,
16+ "Nancy" : " 2.0.0-barneyrubble"
17+ },
18+ "frameworks" : {
19+ "netcoreapp1.0" : {
20+ "dependencies" : {
21+ "Microsoft.NETCore.App" : {
22+ "type" : " platform" ,
23+ "version" : " 1.0.1"
24+ },
25+ "Microsoft.FSharp.Core.netcore" : " 1.0.0-alpha-160831"
26+ }
27+ }
28+ },
29+ "tools" : {
30+ "dotnet-compile-fsc" :" 1.0.0-preview2-*"
31+ },
32+ "version" : " 1.0.0-*"
33+ }
You can’t perform that action at this time.
0 commit comments