This repository was archived by the owner on Mar 24, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "framework" : " suave" ,
3+ "maintainers" : [" ademar" ],
34 "tests" : [
45 {
56 "default" : {
1415 "flavor" : " None" ,
1516 "orm" : " None" ,
1617 "platform" : " .NET" ,
17- "webserver" : " None " ,
18+ "webserver" : " Suave " ,
1819 "os" : " Linux" ,
1920 "database_os" : " Linux" ,
2021 "display_name" : " Suave" ,
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET.Sdk" >
1+ <Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >net7 .0</TargetFramework >
5+ <TargetFramework >net10 .0</TargetFramework >
66 <ServerGarbageCollection >true</ServerGarbageCollection >
77 <!-- Settings applicable to JIT-based deployment -->
88 <TieredPGO >true</TieredPGO >
1313 </ItemGroup >
1414
1515 <ItemGroup >
16- <PackageReference Include =" Suave" Version =" 2.6.2" />
17- <PackageReference Update =" FSharp.Core" Version =" 7.0.0" />
16+ <PackageReference Include =" Suave" Version =" 3.2.*" />
1817 </ItemGroup >
1918
2019</Project >
Original file line number Diff line number Diff line change 11open Suave
2- open Suave.Filters
32open Suave.Operators
3+ open Suave.Router
44open Suave.Json
55
66open System.Net
@@ -9,11 +9,10 @@ open System.Runtime.Serialization
99[<DataContract>]
1010type JsonMessage = { [<field: DataMember( Name = " message" ) >] message: string }
1111
12- let app =
13- choose [
14- path " /plaintext" >=> Writers.setMimeType " text/plain; charset=utf-8" >=> Successful.OK " Hello, World!"
15- path " /json" >=> Writers.setMimeType " application/json; charset=utf-8" >=> Successful.ok ( toJson { message = " Hello, World!" })
16- ]
12+ let app : WebPart = router {
13+ get " /plaintext" ( Writers.setMimeType " text/plain; charset=utf-8" >=> Successful.OK " Hello, World!" )
14+ get " /json" ( Writers.setMimeType " application/json; charset=utf-8" >=> Successful.ok ( toJson { message = " Hello, World!" }))
15+ }
1716
1817let cfg = { defaultConfig with bindings = [ HttpBinding.create HTTP IPAddress.Any 8080 us ] }
1918
Original file line number Diff line number Diff line change 1- FROM mcr.microsoft.com/dotnet/sdk:7.0.100
1+ FROM mcr.microsoft.com/dotnet/sdk:10.0
22WORKDIR /app
33COPY src/App .
44RUN dotnet publish -c Release -o out
You can’t perform that action at this time.
0 commit comments