currency

Currency converter written in Angular

Stars
14

Currency is a currency converter written in Angular.

Features

  • Convert multiple currencies at the same time
  • Rates come from http://xe.com/ (scrapped using my API)
  • Save selected currencies and typed value in localStorage

Building

The server task in gulpfile.js and the API server rely on a Koa server. Koa currently requires node 0.11.x for the harmony flag. Launch them with the following command:

# frontend environment
node --harmony-generators `which gulp` serve

# backend environment
node --harmony-generators api

API

Took down the endpoint because it does not respect the XE’s Terms of Use

GET /currencies
[
  {
    "code": "AED",
    "name": "Emirati Dirham"
  },
  {
    "code": "AFN",
    "name": "Afghan Afghani"
  },
  {
    "code": "ALL",
    "name": "Albanian Lek"
  },
  ...
]
  • GET /rate/:from/:to will return exchange rate between specified currencies.
    • :from three-character currency code
    • :to three-character currency code
GET /rate/xbt/eur
{
  "from": "XBT",
  "to": "EUR",
  "rate": 431.951,
  "timestamp": "2014-03-08T12:56:00.000Z"
}

Todos

  • Improve cross-browser compatibility
  • Reduce API calls on client side
  • Improve server implementation

Dependencies

References