Exercise 7: Setting up a development environment

This exercise aims to help you to set up development using GIT, and some cloud services.

  1. Set up a Heroku account and do the getting started with python tutorial. The Heroku toolbet is installed on linux in the lab machines.
  2. Launch your project on Heroku.

In this lab you will be setting up a server on a cloud computing platform and deploying your website to it.

Overview

There are many hosting services available that provide a server available on the internet. The hosting company sorts out the hardware and gives you details to connect to your server (usually a virtual machine) and deploy your code. There are many hosting companies that offer similar services: Amazon Web Services, Microsoft Azure and Google Cloud. These are premium services that offer high reliabilty and can cost a lot. However, they all offer free tiers for a fixed period. If you are interested in deploying a website permanently, there are cheaper alternatives: A2 Hosting and Vultr for example. We are going to use Heroku since it offers an ongoing free level of service without the need for credit cards etc.

Set up your first heroku app

These services will host a web server and your files. They are typically running a full operating system so you can run java, python code, send emails, and do just about anything your desktop machine can do. To set up your first project on the web, go through the Heroku Python Tutorial This assumes that you have Heroklu CLI and Git on your system. It sets up a Django project, but the steps for flask are mostly similar.

Deploy your project

Read though the Mega-tutorial: chapter 18 for instructions on deploying a Flask app via Heroku. Try deploying your project on heroku, following these steps.