Skip to content

Commit

Permalink
Merge pull request #66 from CS3219-AY2425S1/ivan-N2
Browse files Browse the repository at this point in the history
BE: Add DB to Collab Service To Hold All Sessions/FE: Auto Code Saving/FE: Profile View Questions Attempt
  • Loading branch information
lynnetteeee authored Nov 8, 2024
2 parents 3a6290f + 2c67fe5 commit 8fe1de0
Show file tree
Hide file tree
Showing 28 changed files with 657 additions and 123 deletions.
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ services:
- ./peer-prep-user/user-service/.env
volumes:
- ./peer-prep-user/user-service:/app
command: sh -c "npm install && npm start"
- /app/node_modules
environment:
- TZ=Asia/Kuala_Lumpur
command: >
sh -c "apk add --no-cache tzdata\ && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &&
echo $TZ > /etc/timezone &&
npm install &&
npm start"
ports:
- "3001:3001"
depends_on:
Expand Down
235 changes: 235 additions & 0 deletions peer-prep-collab/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions peer-prep-collab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.21.1",
"mongoose": "^8.8.0",
"uuid": "^11.0.2"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions peer-prep-collab/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import express from 'express';
import dotenv from 'dotenv';
import collabRoutes from './routes/collaboration.routes';
import { connectToRabbitMQ, initConsumer } from '.';
import connectToDB from './mongo'

dotenv.config();

Expand All @@ -26,6 +27,7 @@ app.use('/collab', collabRoutes);
connectToRabbitMQ()
.then(async () => {
await initConsumer() //Start consuming
await connectToDB()
})
.then(() => {
const PORT = process.env.PORT || 4003;
Expand Down
Loading

0 comments on commit 8fe1de0

Please sign in to comment.