Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prashant-shahi/ToDo-List-using-Flask-and-MongoDB
Sample Flask App with MongoDB - Simple implementation of ToDo List along with Dockerfile and Kubernetes yaml files
https://github.com/prashant-shahi/ToDo-List-using-Flask-and-MongoDB
docker dockerfile flask flask-docker flask-mongodb k8s mongodb python rest-api
Last synced: 23 days ago
JSON representation
Sample Flask App with MongoDB - Simple implementation of ToDo List along with Dockerfile and Kubernetes yaml files
- Host: GitHub
- URL: https://github.com/prashant-shahi/ToDo-List-using-Flask-and-MongoDB
- Owner: prashant-shahi
- Created: 2016-07-22T21:00:47.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T09:30:21.000Z (4 months ago)
- Last Synced: 2024-11-14T04:03:54.654Z (29 days ago)
- Topics: docker, dockerfile, flask, flask-docker, flask-mongodb, k8s, mongodb, python, rest-api
- Language: JavaScript
- Homepage:
- Size: 232 KB
- Stars: 93
- Watchers: 8
- Forks: 77
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-todos - Flask+MongoDB
README
# To-Do-List
To-Do-List is mini-project made with Flask and MongoDB. Dockerfile is also available to make docker image and docker containers.
## Built using :
```sh
Flask : Python Based mini-Webframework
MongoDB : Database Server
Pymongo : Database Connector ( For creating connectiong between MongoDB and Flask )
HTML5 (jinja2) : For Form and Table
```## Set up environment for using this repo:
```
Install Python ( If you don't have already )
$ sudo apt-get install pythonInstall MongoDB ( Make sure you install it properly )
$ sudo apt install -y mongodbInstall Dependencies of the application (Flask, Bson and PyMongo)
$ pip install -r requirements.txt
```## Run the application
```
Run MongoDB
1) Start MongoDB
$ sudo service mongod start
2) Stop MongoDB
$ sudo service mongod stopRun the Flask file(app.py)
$ FLASK_ENV=development python app.pyGo to http://localhost:5000 with any of browsers and DONE !!
$ open http://localhost:5000To exit press Ctrl+C
```## Using [Docker](https://www.docker.com) [Docker-Compose](https://docs.docker.com/compose)
Make sure that you are inside the project directory, where `docker-compose.yaml` file is present. Now, building and running the application server container and mongodb container using `docker-compose` :
```
Building or fetching the necessary images and later, creating and starting containers for the application
$ docker-compose up -dGo to http://localhost:5000 with any of browsers and DONE !!
$ open http://localhost:5000
```### Running, Debugging and Stopping the application under the hood
```
For almost all of the `docker-compose` commands, make sure that you are inside the project directory, where `docker-compose.yaml` file is present.Passing `-d` flag along with docker-compose, runs the application as daemon
$ docker-compose up -dSeeing all of the logs from the application deployed.
$ docker-compose logsStopping the application
$ docker-compose down
```## Screenshot :
![Screenshot of the Output](https://github.com/CoolBoi567/ToDo-List-using-Flask-and-MongoDB/blob/master/static/images/screenshot.jpg?raw=true "Screenshot of Output")
Thanks to Twitter for emoji support with [Twemoji](https://github.com/twitter/twemoji).
Made with ❤️ from Nepal 🇳🇵