Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Exchange

Author: Genesis Scott

This repo uses the ExchangeRate API to convert USD to the user's desired currency

By Genesis Scott

Setup/Installation Requirements

NOTE: This application fetches data from an external API (ExchangeRate) which requires authentication in the form of an API key.

Getting an API Key

1. Navigate to this website, press "Get Free Key!" by entering your email address

2. The page will redirect to the dashboard, click the "API Keys" link on the left-side navigation bar.

3. Press "Add New API Key"

Screenshot 2023-08-15 at 12 58 09 AM

HOW TO PROTECT YOUR API-KEY

This project includes the dotenv dependency.

Here is how to use it to protect your API Key.

  1. Create a .env file in your project's root dir
$ ~ cd Your-Project

$ touch .env
  1. add the following line to your .env file:
 API_KEY = <your_API_key>
  1. Include the .env file in your project's service logic using imports:
require('dotenv').config(); //this goes at the top of the file 

// Now you can access the variables from process.env
console.log(process.env.API_KEY); // Output: <your_API_key>

Project set-up

  1. Clone github repository onto your local macine:
$ git clone https://github.com/witherScript/currency-exchange
  1. Install project dependencies using npm*
$ npm install
  1. Run project using npm run start
$ npm run start

Known Bugs

  • No reset button creates a cluttered UI with repeated form submissions

Technologies Used

  • Webpack
  • Exchange Rate API
  • ESLint
  • JSON
  • Babel
  • Jest

License

MIT License. Copywright 2021 Genesis Scott. All rights reserved.

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.

About

USD conversion using the Exchange-Rate API, modern JavaScript workflow

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages