Git Product home page Git Product logo

prueba-mercado-libre's Introduction

ADN/SERVERLESS

Instrucciones:

// Descargar proyecto GIT:
git clone https://github.com/shinigarek/prueba-mercado-libre.git

// Ir al módulo y descargar las dependencias:
cd prueba-mercado-libre && npm install

// Ejecutar el siguiente comando para revisar el metodo
node index.js

Si desea agregar nuevos adn`s, debe ir al archivo index.js y agregar las siguientes líneas:

const adn4 = ["GGGTTT","GGGTTT","GGGTTT","GGGTTT","GGGTTT","GGGTTT"];
const adn5 = ["AATTGG","AATTGG","GGGTTT","AATTGG","GGGTTT","GGGTTT"];

console.log( `${adn4} = ${isMutant(adn4)}`);
console.log( `${adn5} = ${isMutant(adn5)}`);

Las APIS solicitadas están alojadas en Amazon y las puedes consultar en las siguientes URLS:

// Para consultar un ADN
[POST] https://bq0iq0swag.execute-api.us-east-2.amazonaws.com/dev/mutant
{ "dna":["ATGCGA","CAGTGC","TTATGT","AGAAGG","CCCCTA","TCACTG"] }

// CURL
curl -X POST \
  https://bq0iq0swag.execute-api.us-east-2.amazonaws.com/dev/mutant \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 65' \
  -H 'Content-Type: application/json' \
  -H 'Host: bq0iq0swag.execute-api.us-east-2.amazonaws.com' \
  -H 'Postman-Token: 0fbc2e42-db08-442f-9f59-42e298533f31,7e6be6e2-1cc0-4e98-aaa1-17c5c965f245' \
  -H 'User-Agent: PostmanRuntime/7.15.2' \
  -H 'cache-control: no-cache' \
  -d '{ "dna":["ATGCGA","CAGTGC","TTATGT","AGAAGG","CCCCTA","TCACTG"] }'


// Para obtener el reporte
    [GET] https://bq0iq0swag.execute-api.us-east-2.amazonaws.com/dev/stats

// CURL
curl -X GET \
  https://bq0iq0swag.execute-api.us-east-2.amazonaws.com/dev/stats \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Host: bq0iq0swag.execute-api.us-east-2.amazonaws.com' \
  -H 'Postman-Token: bd9fd287-9565-486f-bd8b-6ecb8a9d6068,b1a75ca7-d390-4eae-a760-0cc77355f8af' \
  -H 'User-Agent: PostmanRuntime/7.15.2' \
  -H 'cache-control: no-cache'

El siguiente comando ejecuta los test unitarios y además entrega la información del coverage:

  npm run test

By Ezequiel Obreque

prueba-mercado-libre's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.