Magneto wants to recruit as many mutants as possible to fight against the X-Men. He has hired you to develop a project that detects if a Human is mutant based on its DNA sequence.
- Install Java 8.
- Install Mysql v5.x
- Install Maven
- Clone the code in github
- After clone, access project archives and alter the user and password of database in the file application.yml
- In your mysql, create database " mutant "
- Use 8080 port
- In terminal, access the project place and execute the command " mvn clean install "
OBS.: This project uses FlyWay dbMigration, if you want to see the db creation script, please view the following file resources/development/db/migration/V1__Init.sql
URL local: http://localhost:8080/
URL in Amazon: http://mutant-env.ppnvsupnng.us-east-2.elasticbeanstalk.com
Verify mutant DNA Request:
POST /mutants Request body (exemple mutant DNA):
{"dna":["ATGCGA", "CAGGGC", "TTATGT", "AGAAGG", "CCCCTA", "TCACTG"]}
Response: 200 OK
Request body (exemple human DNA):
{"dna":["AATACT", "CCCAGA", "GGGATT", "AATTCC", "AGAGCG", "TCACTG"]}
Response: 403 Forbidden
Statistics Request:
GET /stats Response: 200 (application/json)
{
"count_mutant_dna": 3,
"count_human_dna": 2,
"ratio": 1.5
}
OBS.: See all the services available in this API in a simplified way using Swagger, just access the "/swagger-ui.html" of this application, ex: http://mutant-env.ppnvsupnng.us-east-2.elasticbeanstalk.com/swagger-ui.html
Developer Flavio Augusto Teixeira.