Coder Social home page Coder Social logo

prashant-shahi / todo-list-using-flask-and-mongodb Goto Github PK

View Code? Open in Web Editor NEW
91.0 8.0 75.0 238 KB

Sample Flask App with MongoDB - Simple implementation of ToDo List along with Dockerfile and Kubernetes yaml files

CSS 4.43% HTML 16.90% Python 8.50% JavaScript 67.00% Dockerfile 0.96% Mustache 2.22%
docker dockerfile flask mongodb flask-docker rest-api flask-mongodb k8s python

todo-list-using-flask-and-mongodb's Introduction

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 :

	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 python

Install MongoDB ( Make sure you install it properly )
	$ sudo apt install -y mongodb


Install 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 stop

Run the Flask file(app.py)
	$ FLASK_ENV=development python app.py

Go to http://localhost:5000 with any of browsers and DONE !!
	$ open http://localhost:5000

To exit press Ctrl+C

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 -d

Go 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 -d

Seeing all of the logs from the application deployed.
    $ docker-compose logs

Stopping the application
    $ docker-compose down

Screenshot :

Screenshot of the Output

Thanks to Twitter for emoji support with Twemoji.

Made with โค๏ธ from Nepal ๐Ÿ‡ณ๐Ÿ‡ต

todo-list-using-flask-and-mongodb's People

Contributors

coolboi567 avatar deepsourcebot avatar dependabot[bot] avatar kaustuv942 avatar prashant-shahi avatar proudpirate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

todo-list-using-flask-and-mongodb's Issues

Seperation of Dockerfile

It's kind of getting messy. Separation of the Dockerfile from the codes, or another README for Docker Instruction needed.

ImportError: cannot import name abc

I ran the docker up command and got:
flask-app | File "/usr/lib/python2.7/site-packages/bson/code.py", line 18, in
flask-app | from bson.py3compat import abc, string_type, PY3, text_type
flask-app | ImportError: cannot import name abc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.