https://github.com/avetik-dev/socket_io-apache
https://github.com/avetik-dev/socket_io-apache
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/avetik-dev/socket_io-apache
- Owner: avetik-dev
- Created: 2022-08-29T20:29:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-29T20:34:51.000Z (almost 4 years ago)
- Last Synced: 2025-06-29T21:08:00.704Z (about 1 year ago)
- Language: HTML
- Size: 142 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Socket.Io

## Get Real time users count
## Local Setup
The first time you need to install npm
```
npm install
```
Then set up config.js
```
module.exports = {
siteUrl: 'http://www.example.com',
port: 8082,
dbConfig: {
host: 'localhost',
user: 'developer',
password: 'Dev_123456',
database: 'rosary'
}
}
```
Then set up apache server,
ports should be like on config.js,
for example 8082
```
ServerAdmin admin@propulsion360.site
ServerName example.site
ServerAlias www.example.site
DocumentRoot /var/www/apache_socket_io
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:8082/$1 [P,L]
ProxyPass /socket.io http://localhost:8082/socket.io
ProxyPassReverse /socket.io http://localhost:8082/socket.io
AllowOverride all
```
And lastly, you need to start the node server
```
node index.js
```