-
Notifications
You must be signed in to change notification settings - Fork 50
Add post about To-do flask application #50
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| layout: post | ||
| title: To-Do | ||
| date: 2018-04-05 | ||
| categories: projects | ||
| description: A flask web application to keep organized with a list of tasks | ||
| author: Spencer Mycek | ||
| author-image: https://avatars1.githubusercontent.com/u/32203066?s=460&v=4 | ||
| author-bio: First year computer security with an interest in web development | ||
| author-email: Spence.mycek@gmail.com | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to double check, it is |
||
| author-social: | ||
| github: https://github.com/SpencerMycek | ||
| linkedin: https://www.linkedin.com/in/spencer-mycek-5aa926152/ | ||
| --- | ||
|
|
||
| ## To-Do | ||
| The idea for To-Do came to me as a way to organize what I have to do in terms of homework and other important matters. At the time I had not heard of Trello or other similar things, but even after hearing about them I decided to continue with the creation of To-Do. | ||
| I created To-Do with Flask, a mySQL database, and it is currently running on an ubuntu server. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| ### Flask | ||
| Flask is a web framework. It tools and technology that makes it easier to build a web application. It is also a micro-framework, meaning it has a very small list of dependencies that a user needs to grow and build if they need more plug-ins. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe "Flask is a Python web framework", at least?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "It consists of tools and technology that make building web applications easier." |
||
| Writing the flask-side of this application was a fun learning experience. I already knew the python required, but I had to learn the flask to back it up. I also had to tackle each bug and issue as it arose. I had to adapt my code as I learned better practices for flask, such as the application factory model. The application factory model builds each separate module, such as error handling or authentification, is built and connected to the application instance during startup. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Writing the Flask side..."
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| Flask also has many plug-ins which facilitate the creation of a web application, such as Flask-WTF for web forms and user input, SQLAlchemy for integrating SQL databases, and Werkzeug for a utility library. | ||
|
|
||
| ### Database | ||
| During the creation and testing of the application I used SQLite as a database because it was small and useful for someone wihout access to a server, or the know-how to use one. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| When I did deploy the To-Do application onto an ubuntu server, I made the switch to MySQL. SQLAlchemy made it easier to switch databases and migrate the database in case of a change. In creating this application I learned how to create effective database tables and relationships. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| ### Server | ||
| As I had said above, I had no experience in creating or manipulating a server. | ||
| I used a 1GB memory vm running ubuntu 17.10. There were only a few things I needed to download and install: OpenSSH, OpenSSL, Let's Encrypt CertBot, ufw, pymysql, gunicorn, nginx, and supervisor. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| OpenSSH was useful to SSH into the server and work on it easier. OpenSSL and the Let's Encrypt CertBot were used to obtain an SSL certificate for the application. I used ufw, the UncomplicatedFirewall as a way to secure the website. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "...was useful, as it allowed me to SSH into the server..." |
||
| Gunicorn is a better way to deploy flask applications than the standard way of running the application. And supervisor is a great way to watch over and run the application in conjunction with gunicorn. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| I used nginx to facilitate serving my application on ports 80 and 443. | ||
| Those and other services were very useful in creating a server for my flask application and this project was a very good way to discover my way around linux based servers. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| * * * | ||
|
|
||
| My source code is all available on [GitHub](https://github.com/SpencerMycek). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe link to the specific repository? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/flask/Flask/