Currencee
🔄️ The world's most trusted, fast and secure currency converter
Install / Use
/learn @Evavic44/CurrenceeREADME
Run project locally
This project utilizes a simple nodejs express backend which is hosted on Vercel to hide the API credentials. To run the project locally, follow the steps below:
- First generate your own API keys from Currencybeacon
- Fork and clone the project to your machine.
- Rename
.env.examplein theserverdirectory to.env - Insert your API keys
- Run the commands below
cd server
npm install
npm start
This should start the backend server on localhost:5000
Vite App
With the server running, you can now run the converter locally,
- Rename
.env.exampleto.env - Set
VITE_API_URLto the hosted backend URL (Only relevant for production) - Run the commands below
npm install
npm run dev
Now you can visit localhost:5173 to see the project live.
Server Endpoints
- Visit localhost:5000/currency to see the currency list
- Visit localhost:5000/convert to perform a conversion
[!IMPORTANT] The convert endpoint takes in three parameters, a base currency code
base, a foreign currency codeforeign, and theamountyou would like to convert.
Example endpoint
http://localhost:5000/convert?base=USD&foreign=NGN&amount=1
This should return an object that contains the conversion details.
If you notice any bugs or errors, kindly raise an issue to discuss it. Contributions are also welcome.
Attribution
The converter is powered by the CurrencyBecacon API, which supports over 161 commonly circulating world currencies listed here. These cover 99% of all UN recognized states and territories.
The flags used are embedded using Flagcdn which offers countries images based on their code.
