-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74d33df
commit c0f9317
Showing
6 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
<DebugType>portable</DebugType> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Saturn\Saturn.fsproj" /> | ||
<Compile Include="Program.fs" /> | ||
</ItemGroup> | ||
<Import Project="..\..\.paket\Paket.Restore.targets" /> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module WindowsAuthSample | ||
|
||
open Saturn | ||
open Giraffe.ResponseWriters | ||
open Giraffe.Core | ||
open FSharp.Control.Tasks.V2 | ||
open Saturn.Channels | ||
|
||
|
||
|
||
let browserRouter = router { | ||
forward "" (text "Hello world") | ||
} | ||
|
||
let sampleChannel = channel { | ||
join (fun ctx -> task {return Ok}) | ||
|
||
handle "topic" (fun ctx res msg -> | ||
task { | ||
printfn "%A" msg | ||
return () | ||
} | ||
) | ||
} | ||
|
||
|
||
let app = application { | ||
use_router browserRouter | ||
url "http://localhost:8085/" | ||
add_channel "/channel" sampleChannel | ||
} | ||
|
||
[<EntryPoint>] | ||
let main _ = | ||
run app | ||
0 // return an integer exit code |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FSharp.Core | ||
Giraffe | ||
Microsoft.AspNetCore |
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
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