Skip to content

Commit 943e421

Browse files
committed
fix docker
1 parent 71e81ae commit 943e421

File tree

2 files changed

+8
-70
lines changed

2 files changed

+8
-70
lines changed

.gitignore

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
5-
/frontend/node_modules
6-
/backend/node_modules
7-
/QuestionService/node_modules
8-
/QuestionService/javascript
9-
/AuthService/javascript
10-
/AuthService/node_modules
11-
/MatchingService/javascript
12-
/MatchingService/node_modules
13-
/UserService/node_modules
14-
/UserService/javascript
15-
/ApiGatewayService/javascript
16-
/ApiGatewayService/node_modules
17-
/backend/javascript
18-
/CollabService/javascript
19-
/CollabService/node_modules
20-
/ChatService/node_modules
21-
/ChatService/javascript
4+
node_modules
5+
javascript
226
/.pnp
237
.pnp.js
248

@@ -27,11 +11,8 @@
2711
/coverage
2812

2913
# production
30-
/frontend/build
31-
/backend/build
32-
/QuestionService/build
33-
/CollabService/build
34-
/ChatService/build
14+
build
15+
3516
# misc
3617
.DS_Store
3718
.env

ApiGatewayService/src/index.ts

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,65 +18,22 @@ app.use(cors());
1818
// });
1919

2020
// Define routes for each backend service for local development
21-
// app.use('/questionservice', (req, res) => {
22-
// proxy.web(req, res, { target: 'http://localhost:3002' });
23-
// });
24-
25-
// app.use('/authservice', (req, res) => {
26-
// proxy.web(req, res, { target: 'http://localhost:3003' });
27-
// });
28-
29-
// app.use('/userservice', (req, res) => {
30-
// proxy.web(req, res, { target: 'http://localhost:3004' });
31-
// });
32-
33-
// app.use('/matchingservice', (req, res) => {
34-
// proxy.web(req, res, { target: 'http://localhost:3005' });
35-
// });
36-
37-
//Define routes for each backend service for production/docker containers
3821
app.use("/questionservice", (req, res) => {
39-
proxy.web(req, res, { target: "http://localhost:3002" });
40-
//http://question-service:3002
41-
//http://localhost:3002
22+
proxy.web(req, res, { target: "http://question-service:3002" });
4223
});
4324

4425
app.use("/authservice", (req, res) => {
45-
proxy.web(req, res, { target: "http://localhost:3003" });
46-
//http://auth-service:3003
47-
//http://localhost:3003
26+
proxy.web(req, res, { target: "http://auth-service:3003" });
4827
});
4928

5029
app.use("/userservice", (req, res) => {
51-
proxy.web(req, res, { target: "http://localhost:3004" });
52-
// http://user-service:3004
53-
//http://localhost:3004
30+
proxy.web(req, res, { target: "http://user-service:3004" });
5431
});
5532

5633
app.use("/matchingservice", (req, res) => {
57-
proxy.web(req, res, { target: "http://localhost:3005" });
58-
//http://matching-service:3005
59-
//http://localhost:3005
34+
proxy.web(req, res, { target: "http://matching-service:3005" });
6035
});
6136

62-
//Define routes for each backend service for production/docker containers
63-
// app.use("/questionservice", (req, res) => {
64-
// proxy.web(req, res, { target: "http://question-service:3002" });
65-
// });
66-
67-
// app.use("/authservice", (req, res) => {
68-
// proxy.web(req, res, { target: "http://auth-service:3003" });
69-
// });
70-
71-
// app.use("/userservice", (req, res) => {
72-
// proxy.web(req, res, { target: "http://user-service:3004" });
73-
// });
74-
75-
// app.use("/matchingservice", (req, res) => {
76-
// proxy.web(req, res, { target: "http://matching-service:3005" });
77-
// });
78-
79-
8037
// Start the server
8138
app.listen(3001, () => {
8239
console.log("API Gateway listening on port 3001");

0 commit comments

Comments
 (0)