diff --git a/dotnet/AipsRT/Program.cs b/dotnet/AipsRT/Program.cs index dd0ef15..0995a0a 100644 --- a/dotnet/AipsRT/Program.cs +++ b/dotnet/AipsRT/Program.cs @@ -45,7 +45,7 @@ app.UseCors("frontend"); app.UseAuthentication(); app.UseAuthorization(); -app.MapHub("/testhub"); -app.MapHub("/whiteboardhub"); +app.MapHub("/hubs/test"); +app.MapHub("/hubs/whiteboard"); app.Run(); \ No newline at end of file diff --git a/dotnet/AipsWorker/WorkerService.cs b/dotnet/AipsWorker/WorkerService.cs index 41a082c..48060c5 100644 --- a/dotnet/AipsWorker/WorkerService.cs +++ b/dotnet/AipsWorker/WorkerService.cs @@ -52,6 +52,8 @@ public class WorkerService : BackgroundService try { await _dispatcher.Execute(message, ct); + + Console.WriteLine($"OK: {message.GetType().Name}"); } catch (ValidationException validationException) { diff --git a/front/src/services/testHubService.ts b/front/src/services/testHubService.ts index c797791..325bc94 100644 --- a/front/src/services/testHubService.ts +++ b/front/src/services/testHubService.ts @@ -2,7 +2,7 @@ import {SignalRService} from "@/services/signalr.ts"; const client = new SignalRService( - `http://localhost:5039/testhub`, + `/hubs/test`, ); export const testHubService = { diff --git a/front/src/services/whiteboardHubService.ts b/front/src/services/whiteboardHubService.ts index 9945d81..92f65c0 100644 --- a/front/src/services/whiteboardHubService.ts +++ b/front/src/services/whiteboardHubService.ts @@ -1,7 +1,7 @@ import { SignalRService } from '@/services/signalr.ts' import type { Rectangle, Whiteboard } from '@/types/whiteboard.ts' -const client = new SignalRService(`http://localhost:5039/whiteboardhub`) +const client = new SignalRService(`/hubs/whiteboard`) export const whiteboardHubService = { async connect() { diff --git a/front/vite.config.ts b/front/vite.config.ts index 1a42daa..14b3282 100644 --- a/front/vite.config.ts +++ b/front/vite.config.ts @@ -21,6 +21,11 @@ export default defineConfig({ '/api': { target: 'http://localhost:5266', changeOrigin: true + }, + '/hubs/': { + target: 'http://localhost:5039', + changeOrigin: true, + ws: true } } },