client connected to chat socket back
This commit is contained in:
parent
7b593831bb
commit
a5afd9d247
1114
containers/chat/package-lock.json
generated
1114
containers/chat/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "chat",
|
||||
"name": "pong",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"author": "",
|
||||
@ -23,10 +23,12 @@
|
||||
"@nestjs/common": "^9.0.0",
|
||||
"@nestjs/core": "^9.0.0",
|
||||
"@nestjs/platform-express": "^9.0.0",
|
||||
"@nestjs/platform-socket.io": "^9.4.0",
|
||||
"@nestjs/websockets": "^9.4.0",
|
||||
"cors": "^2.8.5",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rxjs": "^7.2.0",
|
||||
"socket.io": "^4.6.1",
|
||||
"socket.io-client": "^4.6.1",
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -45,7 +45,7 @@ function Chats(){
|
||||
const [socket, setSocket] = useState(null);
|
||||
|
||||
useEffect(()=> {
|
||||
// setSocket(io("http://localhost:4001"));
|
||||
setSocket(io("http://localhost:4001"));
|
||||
}, [])
|
||||
|
||||
useEffect(()=> {
|
||||
|
||||
@ -75,18 +75,18 @@ services:
|
||||
- ./containers/pong:/app
|
||||
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
||||
|
||||
# chat:
|
||||
# image: node:latest
|
||||
# container_name: chat
|
||||
# working_dir: /app
|
||||
# ports:
|
||||
# - 4001:4001
|
||||
# env_file: .env
|
||||
# networks:
|
||||
# - pongNetwork
|
||||
# volumes:
|
||||
# - ./containers/chat:/app
|
||||
# entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
||||
chat:
|
||||
image: node:latest
|
||||
container_name: chat
|
||||
working_dir: /app
|
||||
ports:
|
||||
- 4001:4001
|
||||
env_file: .env
|
||||
networks:
|
||||
- pongNetwork
|
||||
volumes:
|
||||
- ./containers/chat:/app
|
||||
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
||||
|
||||
|
||||
networks:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user