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",
|
"version": "0.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
@ -23,10 +23,12 @@
|
|||||||
"@nestjs/common": "^9.0.0",
|
"@nestjs/common": "^9.0.0",
|
||||||
"@nestjs/core": "^9.0.0",
|
"@nestjs/core": "^9.0.0",
|
||||||
"@nestjs/platform-express": "^9.0.0",
|
"@nestjs/platform-express": "^9.0.0",
|
||||||
|
"@nestjs/platform-socket.io": "^9.4.0",
|
||||||
"@nestjs/websockets": "^9.4.0",
|
"@nestjs/websockets": "^9.4.0",
|
||||||
|
"cors": "^2.8.5",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"rxjs": "^7.2.0",
|
"rxjs": "^7.2.0",
|
||||||
"socket.io": "^4.6.1",
|
"socket.io-client": "^4.6.1",
|
||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -45,7 +45,7 @@ function Chats(){
|
|||||||
const [socket, setSocket] = useState(null);
|
const [socket, setSocket] = useState(null);
|
||||||
|
|
||||||
useEffect(()=> {
|
useEffect(()=> {
|
||||||
// setSocket(io("http://localhost:4001"));
|
setSocket(io("http://localhost:4001"));
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(()=> {
|
useEffect(()=> {
|
||||||
|
|||||||
@ -75,18 +75,18 @@ services:
|
|||||||
- ./containers/pong:/app
|
- ./containers/pong:/app
|
||||||
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
||||||
|
|
||||||
# chat:
|
chat:
|
||||||
# image: node:latest
|
image: node:latest
|
||||||
# container_name: chat
|
container_name: chat
|
||||||
# working_dir: /app
|
working_dir: /app
|
||||||
# ports:
|
ports:
|
||||||
# - 4001:4001
|
- 4001:4001
|
||||||
# env_file: .env
|
env_file: .env
|
||||||
# networks:
|
networks:
|
||||||
# - pongNetwork
|
- pongNetwork
|
||||||
# volumes:
|
volumes:
|
||||||
# - ./containers/chat:/app
|
- ./containers/chat:/app
|
||||||
# entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
entrypoint: ["sh", "-c" , "npm install && npm run start:dev"]
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user