A sample app that implements currency conversion API.
Project
Implementing a NodeJS API to receive currency conversion rates from the following api:
Clone the project repository by running the command below if you use SSH
git clone [email protected]:mdrijwan/createorder-api.git
If you use https, use this instead
git clone https://github.com/mdrijwan/createorder-api.git
Run the command below to install NPM dependencies
npm install
This project is built on stand alone TypeScript so no compilation needed. But you can compile the TypeScript
files to JavaScript
anyway
npm run compile
Then start the server and follow the instructions in the console.
npm run start
Methods
-
To see list of currencies
- GET/dev/currencies
-
To see list of countries
- GET/dev/countries
-
To convert the currencies (
pass the params in query
)- GET/dev/convert
Example: GET/localhost:3000/dev/convert?from=USD&to=MYR&amount=100
This API will be consumed by a VueJS App to display the currency conversion