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
open System | |
open Giraffe | |
open Microsoft.AspNetCore.Http | |
open System.Threading | |
open System.Threading.Tasks | |
module HttpHandlerHelpers= | |
/// Converts an Async HttpHandler to a normal Giraffe Task based HttpHandler | |
let inline convertAsyncToTask (asyncHandler : HttpFunc -> HttpContext -> Async<HttpContext option>) (next : HttpFunc) (ctx : HttpContext) : HttpFuncResult = |
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
open System | |
open System.IO | |
open System.Diagnostics | |
let downloadDependencies deps = | |
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ | |
if not (File.Exists "paket.exe") then | |
async { | |
let url = "http://fsprojects.github.io/Paket/stable" |
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
open System | |
open System.Net | |
open System.Text.RegularExpressions | |
open System.Collections.Generic | |
// Learn more about F# at http://fsharp.org. See the 'F# Tutorial' "project" | |
// for more guidance on F# programming. | |
module Option = | |
let inline defaultMap value f option = match option with | None -> value | Some value -> f value |