Skip to content

Commit 610f402

Browse files
committed
switch to new RunNodeProcess
1 parent 9ba04ed commit 610f402

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

MyApp.Client/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/types/routes.d.ts";
3+
import "./dist/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

MyApp/Program.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,17 @@
7070
options.MapEndpoints();
7171
});
7272

73-
// Proxy development HMR WebSocket and fallback routes to the Next server
73+
// Proxy HMR WebSocket and fallback routes to Node dev server in Development
7474
if (app.Environment.IsDevelopment())
7575
{
76-
// Start the Next.js dev server if the Next.js lockfile does not exist
77-
app.RunNodeProcess(nodeProxy,
78-
lockFile: "../MyApp.Client/dist/lock",
79-
workingDirectory: "../MyApp.Client");
80-
76+
app.RunNodeProcess(nodeProxy, "../MyApp.Client"); // Start Node if not running
77+
app.UseWebSockets();
8178
app.MapNextHmr(nodeProxy);
82-
app.MapFallbackToNode(nodeProxy);
79+
app.MapFallbackToNode(nodeProxy); // Fallback to Node dev server in development
8380
}
8481
else
8582
{
86-
// Map fallback to index.html in production (MyApp.Client/dist > wwwroot)
87-
app.MapFallbackToFile("index.html");
83+
app.MapFallbackToFile("index.html"); // Fallback to index.html in production (MyApp.Client/dist > wwwroot)
8884
}
8985

9086
app.Run();

NuGet.Config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="ServiceStack MyGet feed" value="https://www.myget.org/F/servicestack" />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
6+
</packageSources>
7+
</configuration>

0 commit comments

Comments
 (0)