blabber chat
This project uses Feathers. An open source framework for building APIs and real-time applications.
-
Install your dependencies
cd path/to/blabber-backend npm install
-
Start your app
npm start
-
We can run on multiple ports for scaling
PORT=3030 npm start PORT=3031 npm start PORT=3032 npm start
-
If you run on multiple port, you have to use nginx for load balancing. We can use this config in nginx.conf file. With this configuration, all three instances are runing on single port : http://localhost:3000, so use this new url for backend
upstream blabber_backend { ip_hash; server localhost:3030; server localhost:3031; server localhost:3032; } server { listen 3000; root path/to/blabber-backend; location / { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_pass http://blabber_backend; } }
-
Check backend documentation at this Link
-
Check the test.html file to know how to receive sockets events (you have to login via socket before receiving event)
Run npm test
and all your tests in the test/
directory will be run.
This app comes with a powerful command line interface for Feathers. Here are a few things it can do:
$ npx feathers help # Show all commands
$ npx feathers generate service # Generate a new Service
For more information on all the things you can do with Feathers visit docs.feathersjs.com.