This project is a RESTful API made with NodeJS and Typescript, using express-js
- Crawls the official website of the Central Bank of Venezuela (https://www.bcv.org.ve) daily to retrieve the current Bs./USD exchange rate.
- Stores the exchange rate in a database.
- Provides endpoints to retrieve the current exchange rate, as well as historical rates.
Clone the repository
git clone https://github.com/madfp/node-crawler.git
Install the dependencies
npm i
- Set the environment variables following the .env.example file
- Set up the database using docker
docker compose up -d
- Seed the database
npm run seed
You can see all the available scripts on the package.json file
npm run dev
### Cron job
The project uses a cron job to crawl the exchange rate daily at 13:00 America/Caracas.
You can change the cron job schedule on the src/utils/crawler.ts file