timkg / trademob-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trademob node.js dev test

Dependencies:

  • mysql
  • redis
  • mocha

Known bugs:

  • mysql closes connection after +- 10sec and crashes process. Use connection pool? Using forever at the moment to keep things going.

Assumptions:

Coupon server accepts requests over HTTP from an internal VPN, all requests are thus to be considered as coming from a trusted source

Usage

To run tests: npm test

To run server: npm start

The following set of information needs to be provided for each coupon request:

  • user IP (string)
  • campaign id (int)

To issue a coupon request:

About


Languages

Language:CoffeeScript 100.0%