GerardSoleCa / streaming-challenge-ri

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

streaming-challenge

Build Status Code Coverage

Rational

  • Implemented using RouteInjector
  • Content, Device and ProtectionSystem entities are located in models folder
  • Streaming business API is located under routes whereas the useCase for its business logic is located under useCases folder
  • API supports full CRUD
  • API does not support updates over algorithm in ProtectionSystem. The rational in this is because it makes no sense to support changes of algorithm in a given protectionSystem. If other algorithm should be used, create a new entry
  • Cipher algorithms are taken from openssl. Tested with aes-256-cbc and des-ede3-cbc.

Bonus

  • Backoffice is located under /admin path in the server
  • Docker image is on the Docker Hub

Requirements

  • NodeJS v6.9.4 or higher (not tested under lower versions, but should work if node instance supports ECMA6)
  • MongoDB

Setup

Install software

$ npm install

Test

$ npm test

Run

$ npm start

Docker

Pull docker image from hub

docker pull gerardsoleca/streaming-challenge-ri

or build docker image

docker build -t gerardsoleca/streaming-challenge-ri .

Run image

docker run -d --name mongo mongo
docker run -d -p 40000:40000 --name streaming-challenge --link mongo:mongo gerardsoleca/streaming-challenge-ri

Test image (May fail in some machines depending their compute power (timeout issues on async testing))

docker run -d --name mongo mongo
docker run --rm --link mongo:mongo gerardsoleca/streaming-challenge-ri npm test

About


Languages

Language:JavaScript 98.7%Language:Shell 1.3%