Skip to content

Commit

Permalink
Merge pull request #1 from rarous/master
Browse files Browse the repository at this point in the history
Removed table layout from match
  • Loading branch information
Dzoukr authored Nov 22, 2016
2 parents 8b0b0c0 + f71c72d commit 79515f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Suave.IIS/Configuration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ type Setup = {
/// Parse configuration setup from command line args
let parseSetup (args:string []) =
match args |> Array.length with
| x when x >= 2 -> { Port = uint16 args.[0]; Path = args.[1] } |> Some
| _ -> None
| x when x >= 2 -> { Port = uint16 args.[0]; Path = args.[1] } |> Some
| _ -> None

/// Set Suave port based on command line args setup
let withPort (args:string []) config =
match args |> parseSetup with
| Some(setup) -> { config with bindings=[HttpBinding.mk HTTP IPAddress.Any setup.Port]}
| None -> config
| Some(setup) -> { config with bindings=[HttpBinding.mk HTTP IPAddress.Any setup.Port]}
| None -> config
8 changes: 4 additions & 4 deletions src/Suave.IIS/Filters.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
/// IIS wrapper for Suave.Filters.path function
let path (args:string []) p =
match args |> Configuration.parseSetup with
| Some(setup) -> Suave.Filters.path <| sprintf "/%s%s" setup.Path p
| None -> Suave.Filters.path p
| Some(setup) -> Suave.Filters.path <| sprintf "/%s%s" setup.Path p
| None -> Suave.Filters.path p

/// IIS wrapper for Suave.Filters.pathScan function
let pathScan (args:string []) (pf:PrintfFormat<'a,'b,'c,'d,'t>)=
match args |> Configuration.parseSetup with
| Some(setup) ->
| Some(setup) ->
let newValue = "/" + setup.Path + pf.Value
Suave.Filters.pathScan (PrintfFormat<'a,'b,'c,'d,'t>(newValue))
| None -> Suave.Filters.pathScan pf
| None -> Suave.Filters.pathScan pf

0 comments on commit 79515f7

Please sign in to comment.