This is a Gold price tracking API created using Node.js to keep track of Gold prices daily and update the prices of gold items according to the price everyday.
- The Mock Gold Price API randomly generates a gold price between 30,000 and 80,000 and stores it in the database.
- Users can retrieve the best price of a particular gold item within a specific time range.
- A cron job is set up to automatically update the prices of gold items daily by calling the Mock Gold Price API. This ensures that the gold price changes every day and the updated prices are stored in the database.
- Unit test cases are added for each endpoint to test the functionality of the application.
To run this project, you will need to add the following environment variables to your .env file
MONGO_URL = mongodb+srv://dharmikjethva:welcome2023@brilliantejewels.as2plbv.mongodb.net/?retryWrites=true&w=majority
GOLD_ID = 6465b81448aba4b7394542d1
Clone the project
git clone https://github.com/dharmikjethva30/Brillante-Jewels.git
Go to the project directory
cd Brillante-Jewels
Install dependencies
npm install
Start the server in development mode
npm run dev
To run unit tests of the API
npm test
Start the server in Production mode
npm run prod
Server: Node.js, Express.js
Modules: axios, cors, mongoose, dotenv, morgan, node-cron
Devloper Modules: nodemon
Testing Modules: mocha, chai, chai-http
I'm a Backend Node.js Developer...