A simple shopping cart application that allows adding and removing of several fruit items to a persistant cart issued by the server using a session id
Run on the command line to store application locally
git clone https://github.com/o0Maikeru0o/RESTful-shopping-cart-
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
No prerequisites necessary if running in Node.js
Run command npm install
from the console in this application's directory to install Node module dependencies
Run command npm run build
from the console in this application's directory to run Webpack for bundling and compiling with Babel
Run command npm start
from the console in this application's directory to start the Express server with Nodemon monitoring changes.
-The default port for the server is 1337 on the local host. There are no additional paths.
Run command npm test
to begin unit tests with Jest
// Retreive current cart
Get to '/cart'
// Retreive current inventory
Get to '/inventory'
// Create a new cart if none exists
Post to '/create'
// Add or remove items from the cart
Post to '/add'
Data sent in body of http request as {id: string, quantity: number}
// Clear the cart and reset totals
Delete to '/clear'
All initialization variables can be found in the config.js file