Full-stack web application for students to trade and sell their used books and textbooks. Built using React.js for front-end, Python and Flask for RESTful API, and MongoDB for database. Uses self-built JSON Web Token user authentication, Open Library API for retrieving book information, and AWS S3 buckets for uploading and storing user-taken images in the cloud.
Production version live at bookswap.herokuapp.com.
cd flask-server
python3 -m venv venv
Mac:
source venv/bin/activate
Windows:
venv\Scripts\activate
pip3 install Flask pymongo flask_jwt_extended flask_cors
Mac:
python3 server.py
Windows:
python server.py
Try http://localhost:5000/members or http://127.0.0.1:5000/members in your browser to test API call.
cd client
npm install
npm run dev
Try http://localhost:3000 or http://127.0.0.1:3000 to test frontend.
Use mongodb+srv://gameswap:[email protected]/test
to connect (your external IP must be approved for Network Access before you can connect).
Proxy error: Could not proxy request [API endpoint] from localhost:3000 to http://localhost:5000/ (ECONNREFUSED).
Change "proxy"
in package.json
from "http://localhost:5000"
to "http://127.0.0.1:5000"
.