Skip to content

lichobaron/test-mercado-libre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mercado Libre Test

Requirements

  • Java 17
  • Maven
  • Docker
  • Docker Compose

Compile and Run

Setup

  1. Clone the repository.
  2. Navigate to the project directory.

Running the Application

  1. Start the Docker containers:

    docker-compose up -d
  2. Navigate to the respective project directory:

    • For Coupon Optimization Project:

      cd coupon
    • For Top 5 Favorite Items:

      cd bookmark
  3. Build and run the application:

    mvn clean install
    mvn spring-boot:run

Testing Endpoints

Get Top 5 Items

curl --location --request GET 'http://localhost:8080/coupon/stats'

AWS:

curl --location --request GET 'MercadoLibreBookmarkLB-341430534.us-east-1.elb.amazonaws.com/coupon/stats'

Optimize Coupon

curl --location --request POST 'http://localhost:8081/coupon' \
--header 'Content-Type: application/json' \
--data '{
    "itemIds": [
        "MLA811601010",
        "MLA878620076",
        "MLA1416208901",
        "MLA905560536"
    ],
    "amount": 1000
}'

AWS:

curl --location --request POST 'MercadoLibreCouponLB-158385986.us-east-1.elb.amazonaws.com/coupon' \
--header 'Content-Type: application/json' \
--data '{
    "itemIds": [
        "MLA811601010",
        "MLA878620076",
        "MLA1416208901",
        "MLA905560536"
    ],
    "amount": 1000
}'

Deployment

Architecture

architecture

How to deploy

You can find deployment instructions here: Deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published