Exemple #1
0
        static async Task Run(string rootDirectory, CancellationToken token)
        {
            var webBuilder = await CommandHelpers.GetWebBuilder(rootDirectory);

            using (var host = webBuilder.BuildWebHost(null, 8080))
            {
                Log.Information("Listening on http://localhost:8080/ ...");
                host.Listen();
                await token;
                Log.Information("Stopped the server...");
            }
        }