Skip to content

turivishal/Socket-Online-Offline-V3.x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Socket Online Offline Demo

socket.io determine if a user is online or offline,
Stack Overflow Question - https://stackoverflow.com/questions/32134623/socket-io-determine-if-a-user-is-online-or-offline

Client Side Connection: Socket IO Client v3.x

Server Side Connection: Socket IO Server v3.x

Setup:

  1. Go to /server derectory and run
npm install
  1. Change the port if you want to change from 3000 to yours in port variable to /server/server.js

  2. Change host url with port in host variable to /client/index.js

  3. Go to /server derectory and run

npm start
  1. open /client/index.html file in your browser