A chat application implementing Web sockets in CodeIgniter.
To join the group chat you must create an account(just username & password) first. Then after you logged in, all
online users will appear to the page inlcuding their respective locations (using Geolocations and Google Maps API) and the chat thread.
Note: Make sure that you allow your location in your browser. Also, sometimes the Geolocation Map API doesn't load right away because of internet connection issues.
Login
Home Page
Request
Express
socket.io
Install:
npm install *module* --save
- Some of the components are CDNs and needs internet connection.
- Apache uses
port 80 or 8080
but the socket doesn't work with that due to security measures of Linux file system (I don't know if windows works with that). I usedport 3000
in order to work but you need to redirect the default port of apache to port 3000 by issuing:sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
in Linux terminal. - Import that SQL file, and update the database config from the project.
- Database is full of random texts (dummy contents).
Open http://localhost/socket-chat/
to your favorite browser then got to terminal and cd /path/to/project
directory then type node server.js
to run the sockets.