var builder = WebApplication.CreateBuilder(args);
var socketName = "my.socket";
var socketPath = Path.Join(Path.GetTempPath(), socketName);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
socketPath = Path.Join("/tmp", socketName);
if (File.Exists(socketPath))
File.Delete(socketPath);
// Configure Kestrel to listen at the UDS path
builder.WebHost.ConfigureKestrel(
opts => opts.ListenUnixSocket(socketPath));
error when starting dev server: Error: listen EACCES: permission denied 127.0.0.1:5173 at Server.setupListenHandle [as _listen2] (node:net:1313:21) at listenInCluster (node:net:1378:12) at GetAddrInfoReqWrap.doListen [as callback] (node:net:1516:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:73:8)