Skip to content

Commit 50a3ba1

Browse files
committed
Add the clientapp
1 parent 6a46ec9 commit 50a3ba1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Exceptionless.AppHost/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616
.WithReference(elastic)
1717
.WithLaunchProfile("Exceptionless API");
1818

19+
builder.AddNpmApp("Web", "../../src/Exceptionless.Web/ClientApp", "dev")
20+
.WithReference(api)
21+
.WithEndpoint(containerPort: 5173, scheme: "http", env: "PORT");
22+
1923
builder.Build().Run();

src/Exceptionless.Web/ClientApp/vite.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default defineConfig({
1919
include: ['src/**/*.{test,spec}.{js,ts}']
2020
},
2121
server: {
22-
port: 5173,
22+
host: true,
23+
port: parseInt(process.env.PORT ?? '5173'),
2324
strictPort: true,
2425
hmr: aspNetConfig.hmr,
2526
proxy: {
@@ -77,7 +78,7 @@ function getAspNetConfig() {
7778

7879
// get current aspnetcore port / url
7980
const aspnetHttpsPort = process.env.ASPNETCORE_HTTPS_PORT;
80-
const aspnetUrls = process.env.ASPNETCORE_URLS;
81+
const aspnetUrls = process.env.ASPNETCORE_URLS ?? process.env.services__Api__0;
8182
const serverPort = 5173;
8283

8384
const hmrRemoteHost = codespaceName ? `${codespaceName}-${serverPort}.${codespaceDomain}` : 'localhost';

0 commit comments

Comments
 (0)