Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 180 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
793cfd4
Setting up GitHub Classroom Feedback
github-classroom[bot] Aug 25, 2022
2e375e2
Add env.sample
fans2619 Sep 2, 2022
d1a103f
Add .gitignore
fans2619 Sep 2, 2022
632d577
Set up part of matching service
fans2619 Sep 15, 2022
a543c6b
add in packages
Sep 15, 2022
9fd07bb
add in gitignore
Sep 15, 2022
2c55291
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
Sep 15, 2022
3a31eda
Create pages
cindyangXQ Sep 15, 2022
390a948
Merge branch 'main' into frontend/pages
cindyangXQ Sep 15, 2022
c25bffe
add in match-service
Sep 15, 2022
162c02e
change to post
Sep 15, 2022
6f1437d
Connect matching service to PostgreSQL
fans2619 Sep 16, 2022
165fb7a
Remove sqlite3 package
fans2619 Sep 16, 2022
ddbcb19
split into three table
Sep 17, 2022
7b7bc65
add in timer
Sep 17, 2022
cdeb1a3
add in socket
Sep 17, 2022
bd32740
buggy lines
Sep 17, 2022
7feabef
Merge branch 'main' into frontend/pages
cindyangXQ Sep 18, 2022
6725fc7
Minor changes
cindyangXQ Sep 18, 2022
92c913f
Refactor matching service
fans2619 Sep 20, 2022
0ec7d6c
Minor changes
fans2619 Sep 20, 2022
9f74e41
Merge pull request #4 from CS3219-AY2223S1/matching-service
fans2619 Sep 21, 2022
d61d59f
Merge branch 'main' into frontend/pages
cindyangXQ Sep 21, 2022
88f3f33
Create more pages
cindyangXQ Sep 21, 2022
34b631f
Update route name
cindyangXQ Sep 21, 2022
966c88b
Create nodejs.yml
fans2619 Sep 26, 2022
399471b
Update matching-service.yml
fans2619 Sep 26, 2022
5041d4d
Update package.json
fans2619 Sep 26, 2022
3f3a2f1
Update package.json
fans2619 Sep 26, 2022
9018184
Update package.json
fans2619 Sep 26, 2022
b534371
Update package.json
fans2619 Sep 26, 2022
637b531
add in questions service
Oct 1, 2022
e2a29cb
Handle leave room in matching service
fans2619 Oct 1, 2022
0052d0a
Explicitly enable CORS when creating SocketIO server
fans2619 Oct 1, 2022
6d6753d
Emit 'in room' with room info when handling 'enter room' event
fans2619 Oct 1, 2022
98958cc
Remove unused packages
fans2619 Oct 2, 2022
78c6810
Merge pull request #18 from CS3219-AY2223S1/matching-service-update-p…
fans2619 Oct 2, 2022
89983b0
Merge branch 'main' into matching-service
fans2619 Oct 2, 2022
8f1111c
Merge pull request #5 from CS3219-AY2223S1/matching-service
fans2619 Oct 2, 2022
4ce65e0
functioning user service
YuunoKun Oct 2, 2022
c05057c
create api for authentication
YuunoKun Oct 2, 2022
98f326b
Add socket
cindyangXQ Oct 4, 2022
2040d87
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Oct 5, 2022
4f99937
Merge branch 'main' into frontend/pages
cindyangXQ Oct 5, 2022
d5ae6af
Update param to match svc
cindyangXQ Oct 5, 2022
620be46
Update matching service event arguments
fans2619 Oct 5, 2022
83c4a05
Merge pull request #20 from CS3219-AY2223S1/matching-service
fans2619 Oct 5, 2022
89148dd
support get question
Oct 6, 2022
59ffe18
change comment info
Oct 6, 2022
c195203
Merge branch 'main' into yaoren-question-service
fans2619 Oct 8, 2022
4e952da
Make request to question service to retrieve a random question ID
fans2619 Oct 8, 2022
2a017fc
Return and store questionId
fans2619 Oct 8, 2022
c29c4cd
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
fans2619 Oct 8, 2022
93c98da
Merge pull request #24 from CS3219-AY2223S1/matching-service
fans2619 Oct 8, 2022
177260c
Delete .gitignore
fans2619 Oct 8, 2022
2ec9c2c
Make changes necessary for matching service
fans2619 Oct 8, 2022
95a0d84
refactor codes
Oct 8, 2022
a732752
merge conflict
Oct 8, 2022
9b804e7
refactor codes
Oct 8, 2022
8c0a1af
Add env.sample
YuunoKun Oct 9, 2022
3822355
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Oct 9, 2022
a601cef
Merge pull request #19 from CS3219-AY2223S1/user-service
YuunoKun Oct 9, 2022
d70ed4a
Fix connection with match
cindyangXQ Oct 10, 2022
3d038d3
Merge branch 'main' into frontend/pages
cindyangXQ Oct 10, 2022
9b1343c
RESTful api for user-service
YuunoKun Oct 10, 2022
e7fdb0d
Refactor arguments in emitted events
fans2619 Oct 10, 2022
e6e61f6
Merge pull request #26 from CS3219-AY2223S1/matching-service
fans2619 Oct 10, 2022
610f13b
Merge branch 'main' into frontend/pages
cindyangXQ Oct 10, 2022
127c875
Fix connection on click
cindyangXQ Oct 10, 2022
4bef804
Use Question svc
cindyangXQ Oct 10, 2022
ae823e9
Authenticate user before handling requests
fans2619 Oct 11, 2022
097d018
Fix user authentication
fans2619 Oct 11, 2022
6897120
Merge branch 'yaoren-question-service' into frontend/pages
cindyangXQ Oct 13, 2022
238cd76
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Oct 13, 2022
08c1d3c
Merge pull request #25 from CS3219-AY2223S1/user-service
YuunoKun Oct 13, 2022
193e8e1
Amend init message
YuunoKun Oct 13, 2022
60acfef
Fix setState
cindyangXQ Oct 13, 2022
33a7965
Update user svc address
cindyangXQ Oct 13, 2022
def71fc
Merge branch 'main' into frontend/pages
cindyangXQ Oct 13, 2022
ca85f70
Bugfix
cindyangXQ Oct 13, 2022
26338cd
Merge pull request #2 from CS3219-AY2223S1/frontend/pages
cindyangXQ Oct 13, 2022
58e998c
add in random ID
Oct 13, 2022
52c9d8d
Merge pull request #29 from CS3219-AY2223S1/yaoren-question-service
BILLXYR Oct 13, 2022
9c4335c
add in json
Oct 13, 2022
51ad64d
Modify parameters
cindyangXQ Oct 13, 2022
f636239
Merge branch 'main' into frontend-bugfix
cindyangXQ Oct 13, 2022
728cd3c
Merge pull request #30 from CS3219-AY2223S1/frontend-bugfix
cindyangXQ Oct 13, 2022
a80b414
Fix bugs to make the app work
fans2619 Oct 13, 2022
a874e94
Merge pull request #31 from CS3219-AY2223S1/fix-bug
fans2619 Oct 13, 2022
e59a256
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
fans2619 Oct 13, 2022
0221350
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Oct 14, 2022
dc7d709
Create timer
cindyangXQ Oct 16, 2022
3bfe09b
Set and remove cookie
cindyangXQ Oct 16, 2022
40a4b82
Restrict access
cindyangXQ Oct 16, 2022
9550b39
Fix logout
fans2619 Oct 17, 2022
73ebe81
Refine page flow and UI
fans2619 Oct 18, 2022
6a7f5bc
Refine calls to user service
fans2619 Oct 18, 2022
6f320f7
Refine UI
fans2619 Oct 18, 2022
0c3a010
Fix type
fans2619 Oct 18, 2022
34643a9
Merge pull request #32 from CS3219-AY2223S1/frontend
fans2619 Oct 18, 2022
2a04d8b
Merge pull request #27 from CS3219-AY2223S1/matching-service
fans2619 Oct 18, 2022
506b72b
Modify routes
fans2619 Oct 19, 2022
0c545a9
Refine routing and navigation logic using useContext
fans2619 Oct 29, 2022
92473e9
Remove unused code in frontend
fans2619 Oct 29, 2022
d113552
Move pages into one directory
fans2619 Oct 29, 2022
2f8399e
Change MatchPage to functional component
fans2619 Oct 29, 2022
c91a01c
Add docker files and .dockeringore
YuunoKun Oct 29, 2022
484a2ce
Add env sample for question service
YuunoKun Oct 29, 2022
2d541e7
Update config
YuunoKun Oct 29, 2022
2211f94
Change RoomPage to functional component
fans2619 Oct 29, 2022
b1863c5
Fix MatchPage timer
fans2619 Oct 29, 2022
e4f7f3a
Reformat code of pages
fans2619 Oct 29, 2022
606b86b
Reformat code
fans2619 Oct 29, 2022
8c3b856
Merge pull request #33 from CS3219-AY2223S1/frontend
fans2619 Oct 29, 2022
1f794ce
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Oct 29, 2022
e62c71d
Add editor service
fans2619 Oct 29, 2022
7d299c5
Add chat service
fans2619 Oct 29, 2022
cbd26d9
Merge pull request #34 from CS3219-AY2223S1/chat-service
fans2619 Oct 29, 2022
432156a
Merge pull request #35 from CS3219-AY2223S1/editor-service
fans2619 Oct 29, 2022
b46becf
Rename event 'enter room' to 'join room'
fans2619 Oct 29, 2022
065ec2f
Return and store room_id for a session
fans2619 Oct 29, 2022
e815268
Pass questionId and roomId as parameters
fans2619 Oct 29, 2022
3f9d50a
Modify RoomPage socket connection logic
fans2619 Oct 30, 2022
a026ff8
Merge pull request #41 from CS3219-AY2223S1/matching-service
fans2619 Oct 30, 2022
650f054
Add global .env file and removed service specific .env
YuunoKun Oct 30, 2022
93554f0
Handle disconnect - destroy rooms in DB
fans2619 Oct 30, 2022
1529b9f
Handle disconnect - destroy all pending matches from DB
fans2619 Oct 30, 2022
c2beab4
Add check for existing match
fans2619 Oct 30, 2022
1e76738
Refine timer
fans2619 Oct 30, 2022
80d0542
Merge pull request #42 from CS3219-AY2223S1/matching-service
fans2619 Oct 30, 2022
24d2e34
Separate match and room namespaces!
fans2619 Oct 30, 2022
9dd5d28
Fix timer by using useRef!
fans2619 Oct 30, 2022
a020142
Clean up code
fans2619 Oct 30, 2022
5ac439e
Connect frontend to editor service and chat service
fans2619 Oct 30, 2022
e2e778b
Fix socket connecting twice initially
fans2619 Oct 30, 2022
38ebf2a
Authenticate user using token initially
fans2619 Oct 31, 2022
97f6b52
Modify services to accommodate containerization
YuunoKun Nov 1, 2022
12d98d2
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Nov 1, 2022
8d0e57b
update package-lock.json
YuunoKun Nov 1, 2022
6b7d624
no message
YuunoKun Nov 1, 2022
9c1fc66
Create message
cindyangXQ Nov 2, 2022
68ac1a8
Add editor and chat
cindyangXQ Nov 2, 2022
40aaf15
Modify layout
cindyangXQ Nov 2, 2022
9a514e6
Merge pull request #44 from CS3219-AY2223S1/frontend
cindyangXQ Nov 2, 2022
4e2adca
Make timer aesthetics
cindyangXQ Nov 2, 2022
ef3b3de
Allow empty content string for editor and chat services
fans2619 Nov 2, 2022
026e835
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
fans2619 Nov 2, 2022
7da1f1d
Fix a typo
fans2619 Nov 2, 2022
63b64e6
Prevent sending empty message
fans2619 Nov 2, 2022
98379e4
Remove onbeforeunload due to compatibility issue with socket.io
fans2619 Nov 2, 2022
c4f855f
Modify layout
cindyangXQ Nov 2, 2022
b770604
Modify layout
cindyangXQ Nov 2, 2022
b5aa0b2
Merge branch 'main' into frontend
cindyangXQ Nov 2, 2022
b24873f
init
YuunoKun Nov 3, 2022
ffca4fc
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Nov 3, 2022
bc16a1f
Merge pull request #43 from CS3219-AY2223S1/docker
YuunoKun Nov 3, 2022
46c97d8
Refine socket.io paths
fans2619 Nov 3, 2022
c76fb95
Merge pull request #48 from CS3219-AY2223S1/socket-fix
fans2619 Nov 3, 2022
b9d487f
Merge branch 'frontend' of https://github.com/CS3219-AY2223S1/cs3219-…
fans2619 Nov 4, 2022
8246c7d
Handle match failure 403 status
fans2619 Nov 4, 2022
4581ba5
Merge branch 'main' into frontend
fans2619 Nov 4, 2022
dead4b8
Reformat code
fans2619 Nov 4, 2022
06c7f4c
Refactor css
fans2619 Nov 4, 2022
20ed72c
Modify package-lock.json
fans2619 Nov 4, 2022
447dc28
Merge pull request #47 from CS3219-AY2223S1/frontend
cindyangXQ Nov 5, 2022
ccc471f
Fix matching service
fans2619 Nov 6, 2022
035ef59
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Nov 6, 2022
03c48e6
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Nov 6, 2022
358b2dc
update api gateway
YuunoKun Nov 6, 2022
daa473d
Merge pull request #49 from CS3219-AY2223S1/gateway
YuunoKun Nov 6, 2022
77cc125
Merge branch 'main' of https://github.com/CS3219-AY2223S1/cs3219-proj…
YuunoKun Nov 8, 2022
8d1ac9d
update user service
YuunoKun Nov 8, 2022
c02afe6
update file names
YuunoKun Nov 8, 2022
a2c71c4
edit readme
YuunoKun Nov 8, 2022
9b1f3c5
amend Readme.md and sample env file
YuunoKun Nov 8, 2022
03e2834
Refactor matching, editor, chat services
fans2619 Nov 8, 2022
7e1b801
update
YuunoKun Nov 8, 2022
eef120a
Merge pull request #50 from CS3219-AY2223S1/user-service
fans2619 Nov 8, 2022
644f547
Update README.md
YuunoKun Nov 9, 2022
f5ccfca
Add project report
fans2619 Nov 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/matching-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: matching-service

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: |
npm run start &
npm test
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Node.js
node_modules/
./matching-service/node_modules
./frontend/node_modules

# JetBrains
.idea/

# PeerPrep
.env
/matching-service/dev.sqlite
Binary file added 6-ProjectReport.pdf
Binary file not shown.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# CS3219-AY22-23-Project-Skeleton
# Running this app locally

This is a template repository for CS3219 project.
1. Make a copy of the `env.sample` file in the root directory of the project and name it `.env`

## User Service
1. Rename `.env.sample` file to `.env`.
2. Create a Cloud DB URL using Mongo Atlas.
3. Enter the DB URL created as `DB_CLOUD_URI` in `.env` file.
4. Install npm packages using `npm i`.
5. Run User Service using `npm run dev`.
2. Fill up the `.env` file

## Frontend
1. Install npm packages using `npm i`.
2. Run Frontend using `npm start`.
> Fields in the `.env` file that you may want to change or fill up:
>
> - `USER_SERVICE_MONGO_ENV`: By default this should be `PROD`, which will allow the user service database to use `USER_SERVICE_MONGO_URI_CLOUD` as the cloud URI. You can change it to `DEV` and run a local MongoDB, then putting the URI in the `USER_SERVICE_MONGO_URI_LOCAL` field.
> - `USER_SERVICE_MONGO_URI_CLOUD`: If you did not change the previous field, you will need to provide an URI to your own cloud MongoDB.
> - `USER_SERVICE_JWT_SECRET_KEY`: You can put your generated secret key here. Or you can use an example secret key: `b00f21108ef28c3984ca9dea05e8bf297a11688779376356e34406543991c0fc36b0ee5a6cf9a30b79e835746088e11932a637553beb82d0f8bc736584697a03`
> - `MATCHING_SERVICE_POSTGRES_PASSWORD`: You can put a new initial postgres password here or leave it as it is. **Do not leave it blank or the Postgres container will fail upon startup.**
>
>
>
> Note: `QUESTION_SERVICE_MONGO_URI_CLOUD` is the URI to the cloud database for question bank which is provided by default as it contains prepared question for the question service. Please do not edit this URI.

3. Run `./startup.sh` and you should see the `.env` file being copied to all backend service folders. **If your computer does not support shell script execution, you can manually copy the `.env` file into *user-service*, *matching-service*, *question-service*, *editor-service* and *chat-service* folders.**

4. Run `docker-compose --env-file ./.env up --build`

5. Wait until all containers are compiled and running, visit `localhost:3000` . (The frontend usually take the longest to compile)
3 changes: 3 additions & 0 deletions api-gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx

COPY ./nginx.conf.template /etc/nginx/conf.d/nginx.conf.template
23 changes: 23 additions & 0 deletions api-gateway/nginx.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
server {
listen ${API_GATEWAY_PORT};

location ${USER_SERVICE_PREFIX} {
proxy_pass http://${USER_SERVICE_HOST}:${USER_SERVICE_PORT}${USER_SERVICE_PREFIX};
}

location ${MATCHING_SERVICE_SOCKETIO_PATH} {
proxy_pass http://${MATCHING_SERVICE_HOST}:${MATCHING_SERVICE_PORT}${MATCHING_SERVICE_SOCKETIO_PATH};
}

location ${QUESTION_SERVICE_PREFIX} {
proxy_pass http://${QUESTION_SERVICE_HOST}:${QUESTION_SERVICE_PORT}${QUESTION_SERVICE_PREFIX};
}

location ${EDITOR_SERVICE_SOCKETIO_PATH} {
proxy_pass http://${EDITOR_SERVICE_HOST}:${EDITOR_SERVICE_PORT}${EDITOR_SERVICE_SOCKETIO_PATH};
}

location ${CHAT_SERVICE_SOCKETIO_PATH} {
proxy_pass http://${CHAT_SERVICE_HOST}:${CHAT_SERVICE_PORT}${CHAT_SERVICE_SOCKETIO_PATH};
}
}
1 change: 1 addition & 0 deletions chat-service/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
11 changes: 11 additions & 0 deletions chat-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:16

WORKDIR /

COPY package*.json ./

RUN npm install

COPY . .

CMD [ "npm", "start" ]
77 changes: 77 additions & 0 deletions chat-service/controller/chat-controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import axios from 'axios';
import { joinRoom, newMessage } from '../service/chat-service.js';
import * as dotenv from 'dotenv';
import * as dotenvExpand from 'dotenv-expand';
dotenvExpand.expand(dotenv.config());
const USER_SRV_PREFIX = process.env.USER_SERVICE_PREFIX;
const GATEWAY_HOST = process.env.API_GATEWAY_HOST;
const GATEWAY_PORT = process.env.API_GATEWAY_PORT;

async function authenticateUser(username, token) {
let authSuccess;
await axios.get(`http://${GATEWAY_HOST}:${GATEWAY_PORT}${USER_SRV_PREFIX}/authentication`, {
params: {
username: username,
auth: token,
},
}).then(() => {
authSuccess = true;
}).catch(() => {
authSuccess = false;
});
return authSuccess;
}

export async function handleJoinRoom(data, socket) {
try {
const { token, username, roomId } = data;
if (token && username && roomId) {
const authSuccess = await authenticateUser(username, token);
if (!authSuccess) {
socket.emit('join room failure', {
status: 403,
message: 'Not allowed to access this resource',
});
return;
}
joinRoom(roomId, socket);
} else {
socket.emit('join room failure', {
status: 400,
message: 'Missing token and/or username and/or roomId',
});
}
} catch (err) {
socket.emit('join room failure', {
status: 500,
message: `The server encounters an error: ${err}`,
});
}
}

export async function handleNewMessage(data, socket) {
try {
const { token, username, message } = data;
if (token && username && (message !== undefined)) {
const authSuccess = await authenticateUser(username, token);
if (!authSuccess) {
socket.emit('message failure', {
status: 403,
message: 'Not allowed to access this resource',
});
return;
}
newMessage(username, message, socket);
} else {
socket.emit('message failure', {
status: 400,
message: 'Missing token and/or username and/or message',
});
}
} catch (err) {
socket.emit('message failure', {
status: 500,
message: `The server encounters an error: ${err}`,
});
}
}
49 changes: 49 additions & 0 deletions chat-service/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import cors from 'cors';

import * as dotenv from 'dotenv';
import * as dotenvExpand from 'dotenv-expand';
import express from 'express';
import { createServer } from 'http';
import { Server } from 'socket.io';
import { handleJoinRoom, handleNewMessage } from './controller/chat-controller.js';

dotenvExpand.expand(dotenv.config());
const PORT = process.env.CHAT_SERVICE_PORT;

const app = express();

app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cors()); // config cors so that front-end can use
app.options('*', cors());

const server = createServer(app);
const io = new Server(server, {
cors: { origin: '*' },
path: process.env.CHAT_SERVICE_SOCKETIO_PATH,
});

io.on('connection', (socket) => {
console.log('a user connected, socket id: ' + socket.id); // ojIckSD2jqNzOqIrAGzL

socket.on('join room', (data) => {
// emitted when user enters the room (page) after matching
handleJoinRoom(data, socket);
});

socket.on('message', (data) => {
// emitted when either user sends a new message
handleNewMessage(data, socket);
});

socket.on('disconnect', () => {
// nothing to handle
console.log('a user disconnected, socket id: ' + socket.id);
});
});

server.listen(PORT, () => {
console.log('Chat service server started on port ' + PORT);
});

export default io;
Loading