This project is a real-time polling website, built with Python's FastApi, Websockets, PyMongo & HTML Javascript.
In this project, we can vote for pizza or burger & those votes will be stored in MongoDB.
Votes will be viewed in the html page by using ( Chart.js ).
Chart.js is an awesome javascript library, which provides simple, flexible javascript charts for website.
Steps to clone this project in your local.
-
Clone this project.
-
go to pizzaVsburger directory & create virtual environement.
-
Copy files from backend directory & paste it in your virtual environment.
-
Install Mongodb in your local. To visualize your data in MongoDB, I recommend use MongoDB Compass.
-
Install all the python requirements from requirements.txt file
After installing all the required dependencies, run the following command in your virtual environment.
uvicorn application:app --reload
This project is going to run on the default port 8000. Hit the http://localhost:8000 in browser & you'll see this output 😀
How I build this project, & all it's details can be found in my medium article. It had more information than this readme file
Here's the link to my Medium Article