API Installation

API Installation

Required

To run the API on your local machine, make sure these items are installed on your computer:

The other items that You need to setup are:

  • Create Your BrightData account and add scraping broser proxy, you can use free trial or you can upgrade it. You see the documentation here

Steps

To run the API in your local machine, follow these steps: Clone the repository to your machine and install the needed dependencies. We use npm to manage our packages, so please make sure it is installed in your local machine.

Clone the Repository

git clone https://github.com/IndraSty/traveloka-scraper.git
 
cd traveloka-scraper

Install the dependencies:

npm install

Start up a docker container running MongoDB and Redis. A docker-compose file is provided to make this easier.Make sure you are in the same root folder as docker-compose is located.

docker compose up

Create an .env file and fill it according to the .env.example file which has been completed according to the required items explained previously.

Run the API on Your local machine

npm start dev