krampstudio / message-center

Dispatch messages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Message Center Engine

Install

Dependencies

  • node.js (>= 0.8 required, 0.10.x advised) from this PPA
  • redis-server

Set up

npm install -g grunt-cli
npm install -g pm2

npm install
npm run install

Update the conf file at conf/config.json. The address of the messages endpoints must be set (where messages are polled from).

Developpment

Run the app

Start the stub:

node ext/server.js

Start the app :

node app.js

A test console is available on port 3000

Production

Use pm2 to manage node processes.

To run the maximum processes (regarding the number of proc,vproc or cores available):

pm2 start app.js -i max

Once the processes are started, run the following command (as root/sudo) to create an init script and enable restart with the server :

sudo m2 dump
sudo pm2 startup

Then you can run the usual service /etc/init.d start/stop:

sudo service pm2-init.sh start/stop/restart/status

To list the running processes :

pm2 list

About

Dispatch messages


Languages

Language:JavaScript 93.9%Language:HTML 5.7%Language:CSS 0.4%