diff --git a/frameworks/FSharp/suave/benchmark_config.json b/frameworks/FSharp/suave/benchmark_config.json index e6ca9696fa2..1f90814a960 100755 --- a/frameworks/FSharp/suave/benchmark_config.json +++ b/frameworks/FSharp/suave/benchmark_config.json @@ -1,5 +1,6 @@ { "framework": "suave", + "maintainers": ["ademar"], "tests": [ { "default": { @@ -14,7 +15,7 @@ "flavor": "None", "orm": "None", "platform": ".NET", - "webserver": "None", + "webserver": "Suave", "os": "Linux", "database_os": "Linux", "display_name": "Suave", diff --git a/frameworks/FSharp/suave/src/App/App.fsproj b/frameworks/FSharp/suave/src/App/App.fsproj index 3b838c61367..043da71dcc0 100755 --- a/frameworks/FSharp/suave/src/App/App.fsproj +++ b/frameworks/FSharp/suave/src/App/App.fsproj @@ -1,8 +1,8 @@ - + Exe - net7.0 + net10.0 true true @@ -13,8 +13,7 @@ - - + diff --git a/frameworks/FSharp/suave/src/App/Program.fs b/frameworks/FSharp/suave/src/App/Program.fs index 817ae5798d6..9a30608b732 100755 --- a/frameworks/FSharp/suave/src/App/Program.fs +++ b/frameworks/FSharp/suave/src/App/Program.fs @@ -1,6 +1,6 @@ open Suave -open Suave.Filters open Suave.Operators +open Suave.Router open Suave.Json open System.Net @@ -9,11 +9,10 @@ open System.Runtime.Serialization [] type JsonMessage = { [] message: string } -let app = - choose [ - path "/plaintext" >=> Writers.setMimeType "text/plain; charset=utf-8" >=> Successful.OK "Hello, World!" - path "/json" >=> Writers.setMimeType "application/json; charset=utf-8" >=> Successful.ok (toJson { message = "Hello, World!"}) - ] +let app : WebPart = router { + get "/plaintext" (Writers.setMimeType "text/plain; charset=utf-8" >=> Successful.OK "Hello, World!") + get "/json" (Writers.setMimeType "application/json; charset=utf-8" >=> Successful.ok (toJson { message = "Hello, World!"})) + } let cfg = { defaultConfig with bindings = [ HttpBinding.create HTTP IPAddress.Any 8080us ] } diff --git a/frameworks/FSharp/suave/suave.dockerfile b/frameworks/FSharp/suave/suave.dockerfile index 29879f01d3c..5bd60dd88b2 100644 --- a/frameworks/FSharp/suave/suave.dockerfile +++ b/frameworks/FSharp/suave/suave.dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0.100 +FROM mcr.microsoft.com/dotnet/sdk:10.0 WORKDIR /app COPY src/App . RUN dotnet publish -c Release -o out