Hi there 👋
My name is Elias and this is my stab at Shopify's Summer 2022 backend intern challenge
The project was completed using Node.js, Express.js and MongoDB (mongoose). Nodemon was also used primarily during the development of this project. Jest and Supertest were used for integration tests.
- Ensure that you have Node.js installed. This project was made using Node v16.3.1 but any LTS version of Node should be sufficient
- Ensure that you have MongoDB installed and setup
- Ensure that you have Git installed and clone the repository using
git clone https://github.com/EliasJRH/Shopify-Backend-Challenge-22.git
- (Recommended) Ensure that you have some tool to send HTTP requests. I used Postman (Note: if you do end up using Postman, I've exported a collection of premade HTTP requests specifically for this project! It can be found here!)
Now that you have this project cloned, it's time to run it!
cd
into the directory where you cloned this repository- Rename the file named
.env.example
to.env
- Install all the dependencies with
npm install
- Start the development server with
npm run dev
- A message displaying the port number and
Connected to database
signifies that the project is ready to go!
Method | Route | Description |
---|---|---|
POST | /inventory | Create inventory item Example request body: |
GET | /inventory | Retrieve all inventory items |
GET | /inventory:id | Retrieve inventory item by id |
GET | /inventory?upc | Retrieve inventory item by upc |
PUT | /inventory:id | Update inventory items with id |
DELETE | /inventory | Delete all inventory items |
DELETE | /inventory:id | Delete inventory item by id |
Method | Route | Description |
---|---|---|
POST | /shipment | Create shipment |
GET | /shipment | Retrieve all shipments |
GET | /shipment:id | Retrieve shipment by id |
PUT | /shipment:id | Update shipment with id |
DELETE | /shipment | Delete all shipments |
DELETE | /shipment:id | Delete shipment with by id |
Examples for request bodies and specific routes can be found in the postman export
To run some basic integration tests, run npm run test
This challenge was neat to do as it brought me back to my days working at a grocery store. I'm glad I was finally able to submit a proper project this year.
Success! This project helped me land a summer backend intern position at Shopify! If you have any questions about this project, feel free to shoot me an email.