From 3b7b000a7fdf15eb92a291002656bd645e1db3cc Mon Sep 17 00:00:00 2001 From: Spencer Mycek Date: Thu, 5 Apr 2018 11:59:26 -0400 Subject: [PATCH 1/2] Add post about To-do flask application --- _posts/2018-04-05-to-do.md | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 _posts/2018-04-05-to-do.md diff --git a/_posts/2018-04-05-to-do.md b/_posts/2018-04-05-to-do.md new file mode 100644 index 0000000..db482e4 --- /dev/null +++ b/_posts/2018-04-05-to-do.md @@ -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 +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. + +### 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. +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 and adapt my code as I learned better prectices for flask, such as the application factory model where seperate modules are kept as blueprints and are built together when flask run. +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. +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 data base in case of a change. In creating this application I learned how to create effective database tables and relationships. + +### Server +As I had said above; I have 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. +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 uncomplicated firewall as a way to secure the website. +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. +I used nginx as how I would serve 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. + +* * * + +My source code is all available on GitHub. From fb1fef0f16409297759caaa08fdef7ad2d60d417 Mon Sep 17 00:00:00 2001 From: Spencer Mycek Date: Fri, 6 Apr 2018 16:47:44 -0400 Subject: [PATCH 2/2] Make minor fixes to sentence structure and spelling --- _posts/2018-04-05-to-do.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_posts/2018-04-05-to-do.md b/_posts/2018-04-05-to-do.md index db482e4..b35024e 100644 --- a/_posts/2018-04-05-to-do.md +++ b/_posts/2018-04-05-to-do.md @@ -19,21 +19,21 @@ I created To-Do with Flask, a mySQL database, and it is currently running on an ### 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. -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 and adapt my code as I learned better prectices for flask, such as the application factory model where seperate modules are kept as blueprints and are built together when flask run. +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. 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. -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 data base in case of a change. In creating this application I learned how to create effective database tables and relationships. +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. ### Server -As I had said above; I have no experience in creating or manipulating a 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. -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 uncomplicated firewall as a way to secure the website. +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. 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. -I used nginx as how I would serve my application on ports 80 and 443. +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. * * * -My source code is all available on GitHub. +My source code is all available on [GitHub](https://github.com/SpencerMycek).