Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.59 KB

README.md

File metadata and controls

38 lines (26 loc) · 1.59 KB

TccInspetorAPI

  • It's a Java API that provides a method for uploading objects to an Amazon S3 Bucket. It corresponds to the TccInspetorAPI component of the following architecture:

  • It was developed in Spring Boot, Jersey and Maven.
  • It is deployed in Heroku.

Setup

Deployment Environment

The deployment in Heroku is done as follows:

  • Create an application on Heroku
  • On the Deploy tab configure the connection to this repository
  • Enable automatic or manual deploy

The credentials to access the bucket must be configured in the API code because the API has to upload files to a private S3 bucket. For security reasons, the credentials must be set in Heroku itself so that they are not publicly visible in the GitHub repository.

  • In the Settings tab, include the pairs KEY and VALUE in Config Vars
  • The values of KEY must be: AWS_ACCESS_KEY_ID, AWS_BUCKET_NAME, AWS_REGION and AWS_SECRET_ACCESS_KEY
  • The values of VALUE must match the values set in the AWS account

Development Environment

  • Clone the repository:
$ git clone https://github.com/ericknilsen/TccInspetorAPI
  • Open Eclipse
  • Import an existing Maven project
  • Import the TccInspetorAPI project directory
  • Execute the class Main.java as a Java Application.
  • Remember that the code references the values set in Heroku. This means that the values of the S3 variables in the UploadServiceImpl.java class must be modified
  • Upload a file via Postman to test the URL http://localhost:8080/upload