1.0.6 • Published 4 years ago

livita-socket-server v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Socket IO Server

Build & Setup

# Clone project
git clone ssh://git@bitbucket.livita.hu/livita/socketioserver.git

# prepare Socket IO Server
cd socketioserver

# Install the packages with npm
npm install -g gulp-cli

# Run gulp
gulp build

Config

There is default.json config file in the config folder.

{
  "secure": false,
  "port": 8084,
  "key_file": "./privkey.pem",
  "cert_file": "./cert.pem"
}

secure: true, if the server has https connection

port: port of socket server connection

key_file: the https vhost private key file

cert_file: the https vhost cert file

# Run server
node ./dist/server.js

# You will see the following output.
## $ node ./dist/server/server.js
## listening on *:8084
## connect id: YMVkWEPjj9rvzhbUAAAA
## { action: 'register',
##   direction: 'fromUser',
##   data: { phoneNumber: '+36709487056', id: 2 } }
## User has registered id: 2
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago