Part I: Setting Up Your Setup - Jfeatherstone/SlackAppTutorial GitHub Wiki
The goal of this step is to get everything setup so that the rest of the tutorial can be focused on actually programming and configuring our server. If you already have a Heroku account and a python environment on your computer, you can skip to Part II: ??. If not, that's perfectly fine, that's why I made this page.
What is Heroku
I've mentioned the name a few times now, and if you don't know what this service is, you've probably been wondering what exactly we will use it for. Heroku is a cloud hosting (Platform as a Service) company that gives you the ability to have a program attached to a server, so that whenever it receives a request, it can respond easily. We could certainly run our server from our own computer (the same exact code would actually work) but this would be a hassle for numerous reasons:
- The computer would have to be running 24/7
- We might have to do some wonky stuff with ports/IP addresses
- We would have to know a whole lot more about how servers work
Heroku is nice because it does most of the hard stuff while we just give it our code and forget about everything. Heroku is not the only service that offers what we are looking for, and some alternatives include OpenShift and Amazon Web Services. It isn't a bad idea to look into these services and others to see which suits your needs best.
A few of the reasons that I use Heroku are:
- It is free; there are some restrictions on free accounts, but this isn't too big of a deal for us
- It is easy to setup; they have packages for the latest python versions and you can easily install other libraries
- It's worked so far
If you decide to use another Platform as a Service company or decide to host your own server, most of this tutorial will still apply, but there may be some important differences. Be sure to do your research on whatever you decide to do.
Make a Heroku Account
Now that I've introduced Heroku, lets make an account! Go to the following link and fill out the fields you are asked to fill out. A free account will work just fine for our purposes, so don't feel the need to upgrade.
Once you sign up, you should be redirected to your project dashboard, which should be empty:
Creating a Heroku Project
Let's create our project by clicking on the "Create new app" button:
Name it whatever you would like (if you don't name it, a randomly generated name will be assigned, which may sound cool, but it makes it hard to organize when you have multiple projects).
Setting up a Python Environment
We will be using python to create our server for the rest of this tutorial, so we first should make sure that we can run python to test our code, and we'll get to setting up our workflow right after. The process of writing python code requires, at bare minimum, just a text editor, though ideally we want a few more features to help us. I am not going to
Resources
You're doing great so far! Part II: ??