forked from thomhurst/TUnit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.fs
More file actions
40 lines (30 loc) · 964 Bytes
/
Program.fs
File metadata and controls
40 lines (30 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
namespace WebApp
#nowarn "20"
open System
open System.Collections.Generic
open System.IO
open System.Linq
open System.Threading.Tasks
open Microsoft.AspNetCore
open Microsoft.AspNetCore.Builder
open Microsoft.AspNetCore.Hosting
open Microsoft.AspNetCore.HttpsPolicy
open Microsoft.Extensions.Configuration
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Hosting
open Microsoft.Extensions.Logging
module Program =
type Program = class end
let exitCode = 0
[<EntryPoint>]
let main (args: string[]) =
let builder = WebApplication.CreateBuilder(args)
builder.Services.AddEndpointsApiExplorer() |> ignore
builder.Services.AddControllers() |> ignore
let app = builder.Build()
app.UseHttpsRedirection()
app.UseAuthorization()
app.MapControllers()
app.MapGet("/ping", Func<string>(fun () -> "Hello, World!")) |> ignore
app.Run()
exitCode