Skip to content

Commit 6ca2cd3

Browse files
committed
Add wwwroot
1 parent 05e8dd7 commit 6ca2cd3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

frontend/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export default defineConfig({
5858
},
5959
base: "./",
6060
build: {
61+
outDir: "../src/ServiceControl/wwwroot",
6162
emptyOutDir: true,
6263
sourcemap: true,
6364
rollupOptions: {

src/ServiceControl/Hosting/Commands/RunCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public override async Task Execute(HostArguments args, Settings settings)
2424
hostBuilder.AddServiceControlApi();
2525

2626
var app = hostBuilder.Build();
27-
app.UseServiceControl();
27+
app.UseServiceControl()
28+
.UseDefaultFiles()
29+
.UseStaticFiles();
2830
await app.RunAsync(settings.RootUrl);
2931
}
3032
}

src/ServiceControl/WebApplicationExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ServiceControl;
77

88
public static class WebApplicationExtensions
99
{
10-
public static void UseServiceControl(this WebApplication app)
10+
public static IApplicationBuilder UseServiceControl(this WebApplication app)
1111
{
1212
app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.All });
1313
app.UseResponseCompression();
@@ -16,5 +16,7 @@ public static void UseServiceControl(this WebApplication app)
1616
app.MapHub<MessageStreamerHub>("/api/messagestream");
1717
app.UseCors();
1818
app.MapControllers();
19+
20+
return app;
1921
}
2022
}

0 commit comments

Comments
 (0)