You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now you have a small but fully functional Flask application.
19
+
The code from the example repository is ready to be deployed. Lets still go
20
+
through the different files and their purpose real quick.
20
21
21
22
### Dependency Tracking
22
23
The Python buildpack tracks dependencies via pip and the `requirements.txt` file. It needs to be placed in the root directory of your repository. The example app specifies only Flask itself as a dependency and looks like this:
23
24
24
25
~~~pip
25
-
Flask==0.9
26
+
Flask==0.10.1
26
27
~~~
27
28
28
29
### Process Type Definition
@@ -36,6 +37,27 @@ web: python server.py
36
37
37
38
Left from the colon we specified the **required** process type called `web` followed by the command that starts the app and listens on the port specified by the environment variable `$PORT`.
38
39
40
+
###The Actual Application Code
41
+
42
+
The actual application code is really straight forward. We import the required
43
+
modules and create an instance of the class. Next we set the routes to trigger
44
+
our hello() function which will then render the jinja template.
0 commit comments