Commit 4d9fff0b authored by 何硕's avatar 何硕

readme

parent 9163c6c4
/node_modules
\ No newline at end of file
1.安装环境
###yarn install 或者 npm install
2.本地运行
###本地运行node index.js
\ No newline at end of file
...@@ -40,6 +40,7 @@ io.on('connection', function(socket){ ...@@ -40,6 +40,7 @@ io.on('connection', function(socket){
socket.on('disconnect', function(obj){ socket.on('disconnect', function(obj){
console.log('user disconnected--------'+socket.nickname); console.log('user disconnected--------'+socket.nickname);
console.log(obj); console.log(obj);
//最后结束不走中断
if (obj != 'client namespace disconnect') { if (obj != 'client namespace disconnect') {
if (socket.nickname) { if (socket.nickname) {
axios.post(BaseUrl + 'websocket/disconnect', { axios.post(BaseUrl + 'websocket/disconnect', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment