src/AppMotor.HttpServer/HttpServerApplication.cs
/// <summary>
/// Runs an HTTP server at the specified port.
/// </summary>
/// <param name="port">The HTTP port to use</param>
/// <param name="listenAddresses">Whether <paramref name="port"/> should be reachable only from the local machine
/// (<see cref="SocketListenAddresses.Loopback"/>) or from anywhere on the network (<see cref="SocketListenAddresses.Any"/>).</param>
/// <param name="cancellationToken">A cancellation token to stop the HTTP server application.</param>
/// <returns>The exit code to use.</returns>
Runs an HTTP server at the specified port.
Runs an HTTP server at the specified port .
[PublicAPI]
    public static Task<int> RunAsync(int port, SocketListenAddresses listenAddresses, CancellationToken cancellationToken = default)
    {
        var app = new HttpServerApplication(port, listenAddresses);
        return app.RunAsync(cancellationToken);
    }
[ PublicAPI ] public static Task < int > RunAsync ( int port , SocketListenAddresses listenAddresses , CancellationToken cancellationToken = default ) { var app = new HttpServerApplication ( port , listenAddresses ) ; return app . RunAsync ( cancellationToken ) ; }
Runs an HTTP server at the specified port.
Runs an HTTP server at the specified port .
The exit code to use.
The exit code to use .
port
int
The HTTP port to use
The HTTP port to use
listenAddresses
SocketListenAddresses
Whether  should be reachable only from the local machine
() or from anywhere on the network ().
Whether should be reachable only from the local machine () or from anywhere on the network () .
cancellationToken
CancellationToken
A cancellation token to stop the HTTP server application.
A cancellation token to stop the HTTP server application .