diff --git a/SushiBarClientApp/APIClient.cs b/SushiBarClientApp/APIClient.cs
index 0703c7b..aaea3ec 100644
--- a/SushiBarClientApp/APIClient.cs
+++ b/SushiBarClientApp/APIClient.cs
@@ -9,9 +9,10 @@ namespace SushiBarClientApp
{
private static readonly HttpClient _client = new();
public static ClientViewModel? Client { get; set; } = null;
+
public static void Connect(IConfiguration configuration)
{
- _client.BaseAddress = new Uri("http://localhost:5262/");
+ _client.BaseAddress = new Uri(configuration["IPAddress"]);
_client.DefaultRequestHeaders.Accept.Clear();
_client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
diff --git a/SushiBarClientApp/Program.cs b/SushiBarClientApp/Program.cs
index 0727468..97baa34 100644
--- a/SushiBarClientApp/Program.cs
+++ b/SushiBarClientApp/Program.cs
@@ -1,10 +1,9 @@
+using SushiBarClientApp;
var builder = WebApplication.CreateBuilder(args);
-
// Add services to the container.
builder.Services.AddControllersWithViews();
-
var app = builder.Build();
-
+APIClient.Connect(builder.Configuration);
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
@@ -12,16 +11,11 @@ if (!app.Environment.IsDevelopment())
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
-
app.UseHttpsRedirection();
app.UseStaticFiles();
-
app.UseRouting();
-
app.UseAuthorization();
-
app.MapControllerRoute(
- name: "default",
- pattern: "{controller=Home}/{action=Index}/{id?}");
-
+ name: "default",
+ pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();
diff --git a/SushiBarClientApp/SushiBarClientApp.csproj b/SushiBarClientApp/SushiBarClientApp.csproj
index 777d524..79f4a53 100644
--- a/SushiBarClientApp/SushiBarClientApp.csproj
+++ b/SushiBarClientApp/SushiBarClientApp.csproj
@@ -6,6 +6,8 @@
enable
+
+
diff --git a/SushiBarRestApi/log4net.config b/SushiBarRestApi/log4net.config
index fe2e7b9..0a91994 100644
--- a/SushiBarRestApi/log4net.config
+++ b/SushiBarRestApi/log4net.config
@@ -1,16 +1,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file