A shopping cart system API where multiple users can purchase products from a shared inventory.
Built with:
- NodeJS
- Typescript
- Express
- Docker
- Run
yarn installto install required dependencies - Create a .env file using
touch .env - Copy the contents of example.env into it using
cp example.env .env - Run
yarn devto start the development server
View fully interactive API documentation here
POST /auth/login to log in with the demo account
{ email: "demo@example.com", password: "password" }GET /products to get all products
GET /products/:id to get a single product
GET /cart to view your cart
POST /cart to add a product to your cart
{ productId: "product ID", quantity: 1 }DELETE /cart/:productId to remove a product from your cart
POST /checkout to checkout the items in your cart