A RESTful shopping cart API for a book shop which can create new users, add/update or delete books from the cart.
- MongoDB
- Flask
- Python
- Clone the repository by pasting the following command in terminal
git clone https://github.com/sashrika15/bookstack.git
- Change directory to /bookstack
cd bookstack
- Install requirements
pip install -r requirements.txt
- Create a free account on cloud MongoDB here. Create a free cluster and add database and collection names as follows:
- Database:
- ecommerce
- Collections:
- users
- products
- Database:
- Get the connection string URI string of your shared cluster and replace in line 7 of app.py and line 4 of prod_insert.py as follows:
cluster = MongoClient("<Your URI string>")
- Run the prod_insert.py file to insert products into your database
python prod_insert.py
- Run app file
python app.py
- Open any web browser and paste the following
localhost:5000
- New User registration
- Template website from here
- For queries, open an Issue or contact me via email.