An open API service indexing awesome lists of open source software.

https://github.com/avetik-dev/socket_io-apache


https://github.com/avetik-dev/socket_io-apache

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# Socket.Io
![](page.png)
## 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
```