Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 1.37 KB

README.md

File metadata and controls

67 lines (52 loc) · 1.37 KB

Query Banguats currency exchange rate

Author

  • José Daniel López (KByteGt)
  • Jr. Web Developer

Setup project

To setup the project, you can unzip the core files in a folder or you can clon the github repository, with the following command

git clone https://github.com/KByteGt/CurrencyExchangeRate

Then, you need to install the project dependencies, in the root folder project, whit the following command

npm install

you can start the server in developer mode, with the following command

npm rund dev

or you can start the server

npm start

Endpoinst of the project

GetRate

INPUT

date: 2021-02-17
currency: USD

OUTPUT

{
    "date": "2018-02-17",
    "currency": "USD",
    "rate": 7.35801
}

GetIntervalRate

INPUT

date: 2021-02-14
date: 2021-02-17
currency: USD

OUTPUT

{
    "start_date": "2021-02-14",
    "end_date": "2021-02-17",
    "currency": "USD",
    "mean": 7.746235,
    "max": 7.75002,
    "min": 7.74185
}

If you like to change the server config, you can do it in the root folder project, config.js file