This is a Simple Inventory Management System API.
It has endpoints to do the following:
-
Log purchase receipts
-
Query DB for total sales in a given month (For this endpoint and the next, I went ahead to allow them to query between 2 specific dates)
-
Query DB for complete product list
-
Add/modify/delete products
-
Query DB for monthly sales by product
http://bit.ly/InventoryApiDocs
To install, using:
npm install
All endpoints are in src > api > index.js
To start, use:
npm start
I just threw in a test for the get all products endpoint.
To run tests, use:
npm test
src ┣ api //Contains the controller file where all the codes that do the actual work are. ┃ ┗ ... ┣ config //Contains mongodb URLs for development and production, ... ┃ ┣ config ┃ ┗ ... ┣ helpers //Contains utility files ┃ ┣ utility ┃ ┗ ... ┣ models //Contains all mongodb models ┃ ┗... ┣ routes //Contains route files ┃ ┗... ┣ index.js