/mashup-api

Primary LanguageJavaScriptMIT LicenseMIT

mashup-api

Running containerized setup

Requirements

  • Docker Engine > 1.13.0

Container running Caddy server, proxying and caching requests to mashup-api. Separate container running mashup-api, using minimal docker image with Node.js.

First time usage, run and build with: $ docker-compose up --build

Example artist lookups (source: https://musicbrainz.org)

Running locally with process manager, PM2

Requirements

  • Node.js > 8.0
  • PM2 (npm install -g pm2)

Start API:

$ npm start

Tailing logs:

$ pm2 logs mashup-api

Stop API:

$ pm2 stop mashup-api

API example

Testing

  • Test framework: Mocha
  • Assertion library: Chai
  • HTTP assertions: supertest

Running tests:

$ npm test

Running tests in watch mode:

$ npm run watch:test