- Uses websockets for communication
- Caches some messages for short period
- Node.js ^5.0.0 node.js homepage
- Redis Redis quickstart
- Run Redis
redis-server
- Install dependencies:
npm install
- Start server and watch changes:
npm run watch
- Visit http://localhost:8080/ to test different events
- To lint (ESlint and JSCS):
npm run lint
- To run tests:
npm run test
- To run tests continuously:
npm run test-watch
Making a deploy - using Dokku
- SSH to host server
- On host server, add ssh key for dokku - help
- On your machine, add a remote repo to your local repository:
git remote add dokku dokku@<host server domain/ip>:<app name>
- To push local vor-backend to Dokku, run in the project root folder (vor):
git push dokku `git subtree split --prefix vor-backend <your branch>`:master
###Connect to Dokku Redis
Redis is used for caching events sent by different
sensor devices in the network.
To access remote Dokku redis-cli:
- SSH to host server
- Run:
dokku redis:connect vor-redis
which opens the redis-client connected to remote dokku redis - If you want to for example to clear redis db, run:
flushall