Created
November 9, 2021 12:26
-
-
Save SchlenkR/18e7523a604e86036db177c5a06c8c24 to your computer and use it in GitHub Desktop.
This file contains 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
#load "Microsoft.NET.Sdk.Web.refs.fsx" | |
#r "nuget: Saturn" | |
open Saturn | |
open Giraffe | |
let defaultRouter = router { | |
get "/" (text "Hello World from Saturn") | |
getf "/%i" (fun index -> text $"Request index: {index}") | |
} | |
let app = application { | |
use_router defaultRouter | |
} | |
let stop = | |
let b = app.Build() | |
b.StartAsync().Wait() | |
fun () -> b.StopAsync().Wait() | |
(* | |
stop() | |
*) |
This file contains 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.IO | |
//Directory.GetFiles(@"C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\5.0.11", "*.dll") | |
//|> Array.map (fun f -> $"""#r "{Path.GetFileName(f)}" """) | |
//|> Array.iter (printfn "%s") | |
#I @"C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\5.0.11" | |
#r "Microsoft.AspNetCore.Antiforgery.dll" | |
#r "Microsoft.AspNetCore.Authentication.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Authentication.Cookies.dll" | |
#r "Microsoft.AspNetCore.Authentication.Core.dll" | |
#r "Microsoft.AspNetCore.Authentication.dll" | |
#r "Microsoft.AspNetCore.Authentication.OAuth.dll" | |
#r "Microsoft.AspNetCore.Authorization.dll" | |
#r "Microsoft.AspNetCore.Authorization.Policy.dll" | |
#r "Microsoft.AspNetCore.Components.Authorization.dll" | |
#r "Microsoft.AspNetCore.Components.dll" | |
#r "Microsoft.AspNetCore.Components.Forms.dll" | |
#r "Microsoft.AspNetCore.Components.Server.dll" | |
#r "Microsoft.AspNetCore.Components.Web.dll" | |
#r "Microsoft.AspNetCore.Connections.Abstractions.dll" | |
#r "Microsoft.AspNetCore.CookiePolicy.dll" | |
#r "Microsoft.AspNetCore.Cors.dll" | |
#r "Microsoft.AspNetCore.Cryptography.Internal.dll" | |
#r "Microsoft.AspNetCore.Cryptography.KeyDerivation.dll" | |
#r "Microsoft.AspNetCore.DataProtection.Abstractions.dll" | |
#r "Microsoft.AspNetCore.DataProtection.dll" | |
#r "Microsoft.AspNetCore.DataProtection.Extensions.dll" | |
#r "Microsoft.AspNetCore.Diagnostics.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Diagnostics.dll" | |
#r "Microsoft.AspNetCore.Diagnostics.HealthChecks.dll" | |
#r "Microsoft.AspNetCore.dll" | |
#r "Microsoft.AspNetCore.HostFiltering.dll" | |
#r "Microsoft.AspNetCore.Hosting.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Hosting.dll" | |
#r "Microsoft.AspNetCore.Hosting.Server.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Html.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Http.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Http.Connections.Common.dll" | |
#r "Microsoft.AspNetCore.Http.Connections.dll" | |
#r "Microsoft.AspNetCore.Http.dll" | |
#r "Microsoft.AspNetCore.Http.Extensions.dll" | |
#r "Microsoft.AspNetCore.Http.Features.dll" | |
#r "Microsoft.AspNetCore.HttpOverrides.dll" | |
#r "Microsoft.AspNetCore.HttpsPolicy.dll" | |
#r "Microsoft.AspNetCore.Identity.dll" | |
#r "Microsoft.AspNetCore.Localization.dll" | |
#r "Microsoft.AspNetCore.Localization.Routing.dll" | |
#r "Microsoft.AspNetCore.Metadata.dll" | |
#r "Microsoft.AspNetCore.Mvc.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Mvc.ApiExplorer.dll" | |
#r "Microsoft.AspNetCore.Mvc.Core.dll" | |
#r "Microsoft.AspNetCore.Mvc.Cors.dll" | |
#r "Microsoft.AspNetCore.Mvc.DataAnnotations.dll" | |
#r "Microsoft.AspNetCore.Mvc.dll" | |
#r "Microsoft.AspNetCore.Mvc.Formatters.Json.dll" | |
#r "Microsoft.AspNetCore.Mvc.Formatters.Xml.dll" | |
#r "Microsoft.AspNetCore.Mvc.Localization.dll" | |
#r "Microsoft.AspNetCore.Mvc.Razor.dll" | |
#r "Microsoft.AspNetCore.Mvc.RazorPages.dll" | |
#r "Microsoft.AspNetCore.Mvc.TagHelpers.dll" | |
#r "Microsoft.AspNetCore.Mvc.ViewFeatures.dll" | |
#r "Microsoft.AspNetCore.Razor.dll" | |
#r "Microsoft.AspNetCore.Razor.Runtime.dll" | |
#r "Microsoft.AspNetCore.ResponseCaching.Abstractions.dll" | |
#r "Microsoft.AspNetCore.ResponseCaching.dll" | |
#r "Microsoft.AspNetCore.ResponseCompression.dll" | |
#r "Microsoft.AspNetCore.Rewrite.dll" | |
#r "Microsoft.AspNetCore.Routing.Abstractions.dll" | |
#r "Microsoft.AspNetCore.Routing.dll" | |
#r "Microsoft.AspNetCore.Server.HttpSys.dll" | |
#r "Microsoft.AspNetCore.Server.IIS.dll" | |
#r "Microsoft.AspNetCore.Server.IISIntegration.dll" | |
#r "Microsoft.AspNetCore.Server.Kestrel.Core.dll" | |
#r "Microsoft.AspNetCore.Server.Kestrel.dll" | |
#r "Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.dll" | |
#r "Microsoft.AspNetCore.Session.dll" | |
#r "Microsoft.AspNetCore.SignalR.Common.dll" | |
#r "Microsoft.AspNetCore.SignalR.Core.dll" | |
#r "Microsoft.AspNetCore.SignalR.dll" | |
#r "Microsoft.AspNetCore.SignalR.Protocols.Json.dll" | |
#r "Microsoft.AspNetCore.StaticFiles.dll" | |
#r "Microsoft.AspNetCore.WebSockets.dll" | |
#r "Microsoft.AspNetCore.WebUtilities.dll" | |
#r "Microsoft.Extensions.Caching.Abstractions.dll" | |
#r "Microsoft.Extensions.Caching.Memory.dll" | |
#r "Microsoft.Extensions.Configuration.Abstractions.dll" | |
#r "Microsoft.Extensions.Configuration.Binder.dll" | |
#r "Microsoft.Extensions.Configuration.CommandLine.dll" | |
#r "Microsoft.Extensions.Configuration.dll" | |
#r "Microsoft.Extensions.Configuration.EnvironmentVariables.dll" | |
#r "Microsoft.Extensions.Configuration.FileExtensions.dll" | |
#r "Microsoft.Extensions.Configuration.Ini.dll" | |
#r "Microsoft.Extensions.Configuration.Json.dll" | |
#r "Microsoft.Extensions.Configuration.KeyPerFile.dll" | |
#r "Microsoft.Extensions.Configuration.UserSecrets.dll" | |
#r "Microsoft.Extensions.Configuration.Xml.dll" | |
#r "Microsoft.Extensions.DependencyInjection.Abstractions.dll" | |
#r "Microsoft.Extensions.DependencyInjection.dll" | |
#r "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll" | |
#r "Microsoft.Extensions.Diagnostics.HealthChecks.dll" | |
#r "Microsoft.Extensions.FileProviders.Abstractions.dll" | |
#r "Microsoft.Extensions.FileProviders.Composite.dll" | |
#r "Microsoft.Extensions.FileProviders.Embedded.dll" | |
#r "Microsoft.Extensions.FileProviders.Physical.dll" | |
#r "Microsoft.Extensions.FileSystemGlobbing.dll" | |
#r "Microsoft.Extensions.Hosting.Abstractions.dll" | |
#r "Microsoft.Extensions.Hosting.dll" | |
#r "Microsoft.Extensions.Http.dll" | |
#r "Microsoft.Extensions.Identity.Core.dll" | |
#r "Microsoft.Extensions.Identity.Stores.dll" | |
#r "Microsoft.Extensions.Localization.Abstractions.dll" | |
#r "Microsoft.Extensions.Localization.dll" | |
#r "Microsoft.Extensions.Logging.Abstractions.dll" | |
#r "Microsoft.Extensions.Logging.Configuration.dll" | |
#r "Microsoft.Extensions.Logging.Console.dll" | |
#r "Microsoft.Extensions.Logging.Debug.dll" | |
#r "Microsoft.Extensions.Logging.dll" | |
#r "Microsoft.Extensions.Logging.EventLog.dll" | |
#r "Microsoft.Extensions.Logging.EventSource.dll" | |
#r "Microsoft.Extensions.Logging.TraceSource.dll" | |
#r "Microsoft.Extensions.ObjectPool.dll" | |
#r "Microsoft.Extensions.Options.ConfigurationExtensions.dll" | |
#r "Microsoft.Extensions.Options.DataAnnotations.dll" | |
#r "Microsoft.Extensions.Options.dll" | |
#r "Microsoft.Extensions.Primitives.dll" | |
#r "Microsoft.Extensions.WebEncoders.dll" | |
#r "Microsoft.JSInterop.dll" | |
#r "Microsoft.Net.Http.Headers.dll" | |
#r "Microsoft.Win32.SystemEvents.dll" | |
#r "System.Diagnostics.EventLog.dll" | |
#r "System.Diagnostics.EventLog.Messages.dll" | |
#r "System.Drawing.Common.dll" | |
#r "System.IO.Pipelines.dll" | |
#r "System.Security.Cryptography.Pkcs.dll" | |
#r "System.Security.Cryptography.Xml.dll" | |
#r "System.Security.Permissions.dll" | |
#r "System.Windows.Extensions.dll" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment