mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-20 21:54:23 +01:00
Make BTCPayServer works with dotnet watch hot reload
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Runtime.CompilerServices;
|
||||
@@ -18,6 +19,8 @@ namespace BTCPayServer
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
if (args.Length > 0 && args[0] == "run")
|
||||
args = args.Skip(1).ToArray(); // Hack to make dotnet watch work
|
||||
ServicePointManager.DefaultConnectionLimit = 100;
|
||||
IWebHost host = null;
|
||||
var processor = new ConsoleLoggerProcessor();
|
||||
@@ -59,7 +62,8 @@ namespace BTCPayServer
|
||||
var urls = host.ServerFeatures.Get<IServerAddressesFeature>().Addresses;
|
||||
foreach (var url in urls)
|
||||
{
|
||||
logger.LogInformation("Listening on " + url);
|
||||
// Some tools such as dotnet watch parse this exact log to open the browser
|
||||
logger.LogInformation("Now listening on: " + url);
|
||||
}
|
||||
host.WaitForShutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user