Skip to content

Commit 047cea1

Browse files
committed
sync configs
1 parent ab0a08f commit 047cea1

File tree

6 files changed

+12
-136
lines changed

6 files changed

+12
-136
lines changed

MyApp.Client/src/lib/gateway.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Authenticate } from "@/lib/dtos"
55

66
const serverRoutePaths = [
77
'/Identity',
8+
'/metadata',
89
'/api',
910
'/ui',
1011
'/chat',

MyApp.Client/vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ const proxy = {
3535
'^/api': {
3636
target,
3737
secure: false
38+
},
39+
'^/metadata': {
40+
target,
41+
secure: false
3842
}
3943
}
4044

@@ -78,6 +82,7 @@ export default defineConfig({
7882
target: 'baseline-widely-available',
7983
},
8084
server: {
85+
host: true, // Listen on all interfaces (both IPv4 and IPv6)
8186
proxy,
8287
open: false,
8388
}

MyApp.Client/vite.config.ts.orig

Lines changed: 0 additions & 129 deletions
This file was deleted.

MyApp/Program.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
services.AddServiceStack(typeof(MyServices).Assembly);
3939

4040
var app = builder.Build();
41-
var nodeProxy = new NodeProxy("http://localhost:5173") {
41+
var nodeProxy = new NodeProxy("http://127.0.0.1:5173") {
4242
Log = app.Logger
4343
};
4444

@@ -72,16 +72,15 @@
7272
// Proxy development HMR WebSocket and fallback routes to the Next server
7373
if (app.Environment.IsDevelopment())
7474
{
75-
app.UseWebSockets();
76-
app.MapViteHmr(nodeProxy);
77-
7875
// Start the Next.js dev server if the Next.js lockfile does not exist
79-
"../MyApp.Client/dist".AssertDir();
8076
app.RunNodeProcess(nodeProxy,
8177
lockFile: "../MyApp.Client/dist/lock",
8278
workingDirectory: "../MyApp.Client");
8379

80+
app.UseWebSockets();
81+
app.MapViteHmr(nodeProxy);
8482
app.MapFallbackToNode(nodeProxy);
83+
Thread.Sleep(200); // Wait for Node to start
8584
}
8685
else
8786
{

MyApp/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"commandName": "Project",
2323
"dotnetRunMessages": true,
2424
"launchBrowser": true,
25-
"launchUrl": "/",
25+
"launchUrl": "",
2626
"applicationUrl": "https://localhost:5001;http://localhost:5000",
2727
"environmentVariables": {
2828
"ASPNETCORE_ENVIRONMENT": "Development"

MyApp/appsettings.Development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"Logging": {
33
"LogLevel": {
4-
"Default": "Information",
4+
"Default": "Debug",
55
"Microsoft.AspNetCore": "Warning"
66
}
77
}

0 commit comments

Comments
 (0)