Technical test for the company DRENVIO. This project is an API created in Node.js, Express and Mongoose, which aims to present the solution to the proposed challenge.
- Clone this repo.
git clone https://github.com/cristianps1988/drenvio-challenge.git
- Move inside to the directory.
cd drenvio-challenge
- Run
npm install
to install the dependencies.
npm install
-
Add the enviroment variables to a .env file. The example is in the file .env.example. Reeplace <> for your password
-
Run
npm start
for start the server.
npm run start
- Open
http://localhost:4000
in your web browser. - For run the test run
npm run test
npm run test
- /products : Returns all products that are currently in stock.
- /price/:user_id/:product_brand : return the special price for the given client and brand, if available. If the client doesn't have a special price for the brand, return the base price.
- user_id = 653ad5fa280a1c26daf39b76
- product_brand = asics