From cdb738ca42f791ab1ee14e21c21f894b97d714cd Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Fri, 5 Jul 2024 01:11:24 +0300 Subject: [PATCH] fix: set default port 8080 --- .env | 2 +- Endpoint/Program.cs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.env b/.env index 555d136..6a7047e 100644 --- a/.env +++ b/.env @@ -22,7 +22,7 @@ PATH_TO_SAVE= # integer # (optional) # Specify the internal port on which the server will listen. -INTERNAL_PORT= +INTERNAL_PORT=8080 # Security diff --git a/Endpoint/Program.cs b/Endpoint/Program.cs index b6ca7ca..b336aa3 100644 --- a/Endpoint/Program.cs +++ b/Endpoint/Program.cs @@ -16,7 +16,6 @@ using Mirea.Api.Endpoint.Middleware; using Mirea.Api.Security.Services; using System; using System.IO; -using Microsoft.AspNetCore.Hosting; namespace Mirea.Api.Endpoint; @@ -67,14 +66,11 @@ public class Program }); }); - if (!string.IsNullOrEmpty(builder.Configuration.GetValue("INTERNAL_PORT"))) - { builder.WebHost.ConfigureKestrel(options => { options.ListenLocalhost( int.Parse(builder.Configuration.GetValue("INTERNAL_PORT")!)); }); - } builder.Services.Configure(options => {