Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.49 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.49 KB

Vör app

Backend for sensors and clients

  • Uses websockets for communication
  • Caches some messages for short period

Requirements

Local setup

  1. Run Redis redis-server
  2. Install dependencies:npm install
  3. Start server and watch changes: npm run watch
  4. Visit http://localhost:8080/ to test different events

Other commands

  • 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

  1. SSH to host server
  2. On host server, add ssh key for dokku - help
  3. On your machine, add a remote repo to your local repository:
    git remote add dokku dokku@<host server domain/ip>:<app name>
  4. 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:

  1. SSH to host server
  2. Run: dokku redis:connect vor-redis which opens the redis-client connected to remote dokku redis
  3. If you want to for example to clear redis db, run: flushall