Skip to content

Commit

Permalink
Use routing
Browse files Browse the repository at this point in the history
  • Loading branch information
wallymathieu committed Aug 31, 2023
1 parent f6fd65e commit 78535ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion demo-apps/MinimalApp/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ open Giraffe
let builder = WebApplication.CreateBuilder()
builder.Services.AddGiraffe() |> ignore
let app = builder.Build()
let webApp =
choose [
route "/ping" >=> text "pong"
route "/" >=> text "Hello World" ]

app.UseGiraffe(text "Hello World!")
app.UseGiraffe(webApp)
app.Run()

0 comments on commit 78535ba

Please sign in to comment.