My submission for the Shopify Production Engineer and Backend Developer technical challenges.
There are two options to build and run the program locally. Via npm
or via docker
.
A local installation of MongoDB
is required for building and running the program. A free community version can be found here: https://www.mongodb.com/try/download/community.
From the root of the project, run:
sudo mongod
npm install
npm run dev
The program will run on http://localhost:3000.
From the root of the project, run:
docker-compose up
The program will run on http://localhost:4000.
To run tests:
npm install
npm run test
The application is a simple CRUD API for managing vendors and their inventory. The routes are documented below.
All /api/product
routes can be found in the product.router.js module within the source code.
Retrieves a list of all inventory items.
Retrieves a list of all inventory items of a specific vendor.
Creates a new inventory item for a specific vendor.
Retrieves a specific inventory item.
Updates a specific inventory item.
Deletes a specific inventory item.
All /api/vendor
routes can be found in the vendor.router.js module within the source code.
Retrieves a list of all vendors.
Creates a new vendor.
Retrieves a specific vendor.
Updates a specific vendor.
Deletes a specific vendor.