Skip to content

Commit aa3b93b

Browse files
committed
update kubernetes file
1 parent 564be4f commit aa3b93b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

matching-service/src/app.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ import cors from "cors";
33
import * as dotenv from "dotenv";
44

55
import messageRoutes from "./routes/messageRoute";
6-
import { initRabbitMQ, subscribeToQueue } from "./services/rabbitMqService";
6+
import { initRabbitMQ } from "./services/rabbitMqService";
77
import redisClient from "./config/redisConfig";
8-
import {
9-
processNewUser,
10-
startBackgroundTransfer,
11-
} from "./services/matchingService";
12-
import { User } from "./types";
8+
import { startBackgroundTransfer } from "./services/matchingService";
139

14-
dotenv.config({ path: ".env.dev" });
10+
const envFile =
11+
process.env.NODE_ENV === "production" ? ".env.production" : ".env.dev";
12+
console.log(`Using env file: ${envFile}`);
13+
dotenv.config({ path: envFile });
1514

1615
const app = express();
1716
const PORT = process.env.PORT || 5001; // 5001 to prevent conflicts
18-
const QUEUE = process.env.MATCHING_SERVICE_QUEUE || "matching-service";
1917

2018
app.use(express.json());
2119
app.use(cors()); // config cors so that front-end can use

0 commit comments

Comments
 (0)