Header menu logo FSharp.AspNetCore.WebAppBuilder

CommandLine Module

Contains an alternative webApp builder that accepts command line arguments.

Functions and values

Function or value Description

webApp args

Full Usage: webApp args

Parameters:
Returns: WebAppBuilder

Creates a web application using computation expression syntax and the given command line arguments.

args : string array

The command-line arguments to give to the underlying WebApplication.CreateBuilder call.

Returns: WebAppBuilder
Example

 open System
 open FSharp.AspNetCore.Builder.CommandLine

 let app =
     webApp (Environment.GetCommandLineArgs ()) {
         get "/hello" (fun () -> "🌎")
     }
namespace System
namespace Microsoft.FSharp
val app: obj
type Environment = static member Exit: exitCode: int -> unit static member ExpandEnvironmentVariables: name: string -> string static member FailFast: message: string -> unit + 1 overload static member GetCommandLineArgs: unit -> string array static member GetEnvironmentVariable: variable: string -> string + 1 overload static member GetEnvironmentVariables: unit -> IDictionary + 1 overload static member GetFolderPath: folder: SpecialFolder -> string + 1 overload static member GetLogicalDrives: unit -> string array static member SetEnvironmentVariable: variable: string * value: string -> unit + 1 overload static member CommandLine: string ...
<summary>Provides information about, and means to manipulate, the current environment and platform. This class cannot be inherited.</summary>
Environment.GetCommandLineArgs() : string array

Type something to start searching.