File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,17 @@ import cors from "cors";
3
3
import * as dotenv from "dotenv" ;
4
4
5
5
import messageRoutes from "./routes/messageRoute" ;
6
- import { initRabbitMQ , subscribeToQueue } from "./services/rabbitMqService" ;
6
+ import { initRabbitMQ } from "./services/rabbitMqService" ;
7
7
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" ;
13
9
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 } ) ;
15
14
16
15
const app = express ( ) ;
17
16
const PORT = process . env . PORT || 5001 ; // 5001 to prevent conflicts
18
- const QUEUE = process . env . MATCHING_SERVICE_QUEUE || "matching-service" ;
19
17
20
18
app . use ( express . json ( ) ) ;
21
19
app . use ( cors ( ) ) ; // config cors so that front-end can use
You can’t perform that action at this time.
0 commit comments