This Project is a service using nodeJS, ExpressJS and the api from Mercado Libre for a evaluation
└── docs
│ └── swagger.yml
└── src
│ └── application
│ │ └── controllers
│ │ │ └── items.controller.js
│ │ └── routes
│ │ │ └── items.route.js
│ │ │ └── index.js
│ │ └── dictionaries
│ │ │ └── dictionary.errors.json
│ │ └── app.js
│ └── infrastructure
│ │ └── axios
│ │ └── instance.js
│ │ └── service
│ │ └── items.service.js
│ └── util
│ │ └── getPrice.js
│ └── index.js
└── test
│ └── integration
│ │ └── data
│ │ │ └── itemSuccess.json
│ │ │ └── querySuccess.json
│ │ └── stub
│ │ │ └── getItemData.json
│ │ │ └── getItemDescription.json
│ │ │ └── getQuery.json
│ │ └── items.test.js
│ └── unit
│ │ └── getPrice.test.js
└── .gitignore
└── .eslintrc.json
└── package.json
└── package-lock.json
└── README.MD
- Clone this repo and install all dependencies
npm install- Run this project.
npm startOpen the proyect in your localhost port 4000
In this project i used eslint with the specification of Airbnb, you can run the linter with the following command
npm run lintIn this project i used Jest for testing, you can run this tests with the following command
Run unit test
npm run testRun integration test
npm run integration-testTo see the swagger, install Swagger Viewer in your Visual Studio Code
- Open the command pallet with Command+Shift+p and type
Preview Swagger - Or navigate to this site and paste the
docs/swagger.ymlin the editor
In this project i used dependency-check for checking which modules i have used in my code and then makes sure they are listed as dependencies in the package.json, or vice-versa
Run dependency-check
npm run dependency-checkThis project is ready to deploy using Serverless Framework and Serverless Components in this case i use Express Component
Install the last version of Serverless and deploy 🎉
npm install -g serverlessserverless deploy- Franco Meriles
