Skip to content

Commit e3bd6b1

Browse files
committed
Include matchmake in api gateway
1 parent fc8483c commit e3bd6b1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

api_gateway/src/proxy/routes_config.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { questionServiceUrl, userServiceHostUrl } from "./service_addresses";
1+
import { matchServiceHostUrl, questionServiceUrl, userServiceHostUrl } from "./service_addresses";
22

33
export const routes_config = [
44
{
@@ -23,5 +23,14 @@ export const routes_config = [
2323
pathRewrite: {
2424
'/auth': '/' }
2525
}
26+
},
27+
{
28+
url: "/matchmake",
29+
proxy: {
30+
target: matchServiceHostUrl,
31+
ws: true,
32+
pathRewrite: {
33+
'/matchmake': '/' }
34+
}
2635
}
2736
]

api_gateway/src/proxy/service_addresses.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export const isLocal = process.env.ENV_TYPE !== "docker";
33

44
export const questionServiceUrl = isLocal ? "http://localhost:8080" : "http://question-service:8080/";
55
export const userServiceHostUrl = isLocal ? "http://localhost:8081" : "http://user-service:8081/";
6+
export const matchServiceHostUrl = isLocal ? "ws://localhost:8082" : "ws://matching-service:8082"

0 commit comments

Comments
 (0)