From 71a1691e2e216f9faf3eb98c4396f1c135a7b0d7 Mon Sep 17 00:00:00 2001 From: iamabin Date: Tue, 12 Mar 2024 14:40:12 +0530 Subject: [PATCH] changed workflow --- admin/src/index.ts | 1 + auth/src/index.ts | 1 + chat/src/index.ts | 1 + client/src/App.tsx | 1 - client/src/routes/AdminRoutes.tsx | 1 + job/src/index.ts | 1 + payment/src/index.ts | 1 + profile/src/index.ts | 2 +- 8 files changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/src/index.ts b/admin/src/index.ts index 8c0fa73c..21216086 100644 --- a/admin/src/index.ts +++ b/admin/src/index.ts @@ -31,6 +31,7 @@ const start = async () => { if (!process.env.MONGO_URL_ADMIN) { throw new Error("MONGO_URL_ADMIN must be defined"); } + // to connect to mongodb await connectDB(); diff --git a/auth/src/index.ts b/auth/src/index.ts index 515bc155..6a01da6e 100644 --- a/auth/src/index.ts +++ b/auth/src/index.ts @@ -39,6 +39,7 @@ const start = async () => { // to connect to mongodb await connectDB(); + // it is used to listen to incomming message from kafka topics const userUpdatedEvent = new UserUpdatedEventConsumer(kafkaClient) diff --git a/chat/src/index.ts b/chat/src/index.ts index 99b80b41..c44658de 100644 --- a/chat/src/index.ts +++ b/chat/src/index.ts @@ -28,6 +28,7 @@ const start = async () => { console.log("after socket instance"); await connectDB(); + const userCreatedEvent = new UserCreatedEventConsumer(kafkaClient); const userUpdatedEvent = new UserUpdatedEventConsumer(kafkaClient); diff --git a/client/src/App.tsx b/client/src/App.tsx index 475662b7..fe5b2d28 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -45,7 +45,6 @@ export default function App() { // requestPermission(); // }, []); - return ( <> diff --git a/client/src/routes/AdminRoutes.tsx b/client/src/routes/AdminRoutes.tsx index c325bccd..dfccfd87 100644 --- a/client/src/routes/AdminRoutes.tsx +++ b/client/src/routes/AdminRoutes.tsx @@ -36,6 +36,7 @@ const PremiumMembershipPage = lazy( () => import("../pages/payment/PremiumMembershipPage") ); + function AdminRoutes() { const isAdminLoggedIn = useSelector( (state: RootState) => state.adminData.data diff --git a/job/src/index.ts b/job/src/index.ts index 3cab6bee..fb6ef06b 100644 --- a/job/src/index.ts +++ b/job/src/index.ts @@ -26,6 +26,7 @@ const start = async () => { // to connect to mongodb await connectDB(); + // it is used to listen to incomming message from kafka topics const userCreatedEvent = new UserCreatedEventConsumer(kafkaClient); const userUpdatedEvent = new UserUpdatedEventConsumer(kafkaClient); diff --git a/payment/src/index.ts b/payment/src/index.ts index 872d12cb..991f6f3b 100644 --- a/payment/src/index.ts +++ b/payment/src/index.ts @@ -36,6 +36,7 @@ const start = async () => { // to connect to mongodb await connectDB(); + app.listen(3000, () => { console.log("payment Listening on port 3000...."); }) diff --git a/profile/src/index.ts b/profile/src/index.ts index 34620fc1..f1b31e3e 100644 --- a/profile/src/index.ts +++ b/profile/src/index.ts @@ -40,7 +40,7 @@ const start = async () => { // to connect to mongodb await connectDB(); - + // it is used to listen to incomming message from kafka topics const userCreatedEvent = new UserCreatedEventConsumer(kafkaClient); const userUpdatedEvent = new UserUpdatedEventConsumer(kafkaClient);