/currency-exchange

APIs and Asynchronys

Primary LanguageJavaScript

Currency Exchange

This app allows users to input a dollar amount and it returns the updated amount by chosen currency exchange rate.

By Monica Barboza

Technologies Used

  • HTML
  • CSS
  • JavaScript
  • Webpack
  • NPM
  • ESLint
  • Babel
  • Bootstrap
  • Jest
  • Dotenv

Description

  • This App allows user to input an amount in US dollars and they can select one of 6 different currencies and the app will display the conversion.
  • Example: If the user inputs $10.00 and selects MXN the app displays "The exchange rate for $10 USD to MXN is $172.188"

Setup/Installation Requirements

  • Open terminal or command prompt.
  • Clone the repository by running the following command to your desktop: git clone https://github.com/MonBoza/currency-exchange.git
  • Make sure .gitignore is added to repository.
  • Create a .env file to safely store your API_KEY and process.env.API_KEY then add .env to .gitignore. (see API Key setup)
  • In the .env file you should store your API_KEY on the first line "API_KEY=yourAPIkey" and then "process.env.API_KEY" on the second line to call in your url.
  • Install Packages with $ npm install.
  • Build the project with webpack using $npm run build.
  • Start a development Server with $ npm run start.
  • Lint the JavaScript files in src/js folder with $ run Lint
  • Test out functions and methods with jest with $ npm run test.
  • Tests are located in test file.
  • Open the project in your favorite code editor.
  • Navigate to the to the bottom of the directory.
  • Open index.HTML

API KEY setup

  • To get an API_KEY visit https://www.exchangerate-api.com/docs/overview .
  • Input your email address and click the "Get Free Key" button.
  • You will then be prompted to create an account with your email address, first and password. Agree to the terms and click "Get Started"
  • You will then be able to access the dashboard that contains your API key and remaining API calls.
  • Store you API_KEY in .env file

Known Bugs

  • No known bugs.

License

Copyright 2023 MONICA BARBOZA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Email: (mailto:MonBoza@gmail.com)

Copyright (c) November 17, 2023 Monica Barboza