Designed and implemented a backend API for a Forex Exchange application. An application for currency conversion and exchange rate data.
- Node.js
- MongoDB
- Javascript
- axios
- cors
- dotenv
- express
- express-rate-limit
- express-validator
- jsonwebtoken
- mongoose
-
Clone the repository:
-
Move to the project directory:
-
Install dependencies:
-
Create a
.env
file. -
Configure the following environment variables in the
.env
file:MONGODB_URI
: MongoDB connection URI.EXCHANGE_RATES_API_KEY
: API key for exchange rate data.
- Create a MongoDB database and collections.
- Obtain an API key for exchange rate data and place it in the
.env
file.
- Start the application:
- Access API endpoints:
/api/live
,/api/convert
,/api/historical
.
/api/live
: Fetch live exchange rates./api/convert
: Convert currencies./api/historical
: Fetch historical exchange rate data.