Giter Site home page Giter Site logo

golden-ticket-to-hk's Introduction

Technologies incorporated:

Node.js (v4.2.1)

beanstalkd via fivebeans to create workers for a beanstalkd

mongoDB with mongoose to save the data

bluebird with co to create jobs for the workers

cheerio jQuery tool for Node.js

request simplified HTTP request client for obtaining exchange rate

This program serves as a simple currency converter using a worker to obtain and display exchange rates as a job. The worker finishes the job if:

* it successfully obtains and displays the rate 10 successful times for each minute.
* save the result to mongodb

* or it fails to obtain and display the rate 3 times.
  * if it fails, retry it in 3 seconds

The default exchange rate included is HKD to USD.

Instructions:

  • Clone this git into a directory
  • Run npm install
  • Seed the beanstalk with node producer
  • Watch the consumer do its thing with node consumer
  • Cross your fingers and hope the worker successfully finishes the job

Notes:

You can change the rate for different countries in the producer.js file of the root directory. Just change 'HKD' and 'USD' to countries of your choice (provided they are valid on xe.com)

golden-ticket-to-hk's People

Contributors

laudickson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.