This is a backend project designed to register data on a HubSpot account using an AWS mock API.
Before you begin, ensure you have met the following requirements:
- Node.js on version 20.9.0 installed on your local machine.
- A private application API key to put in the environment file.
-
Clone the repository:
git clone https://github.com/giovane/integrate-iq-test.git
or
git clone git@github.com:giovanedann/integrate-iq-test.git
-
Navigate to the project directory:
cd integrate-iq-test
-
Install dependencies:
npm install
Configure the project by creating a .env
file in the project root and providing the following information:
PORT=desired_port
AWS_BEARER_TOKEN=bearer_token_provided_on_test_pdf
AWS_API_URL=api_url_provided_on_test_pdf
HUBSPOT_ACCESS_TOKEN=your_private_application_api_key
To run the project, use the following command:
npm run dev
This will start the backend server, and you can access the API at http://localhost:PORT
.
To run the script and create the users on your hubspot application, you will need to make a GET request to the following endpoint:
http://localhost:ENV_PORT/contacts/create-many
For that, you can use a REST client like Postman or Insomnia, or you can simply access the following link, after the server is started.
Controllers, services, and extra layers were not used in this project due to the context of the application (only 1 endpoint). I kept it simple, with all centered on the index file, to avoid middlemans and stuff like that on the application.