Skip to content

Commit bbb48b8

Browse files
author
Tobias Fuhrimann
committed
fix typos
1 parent d91452b commit bbb48b8

4 files changed

+7
-10
lines changed

bind-service.html.md.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if 'VCAP_SERVICES' in os.environ:
7070
mongo_credentials = vcap_services['mongodb'][0]['credentials']
7171
mongo_uri = mongo_credentials['uri']
7272
else:
73-
mongo_uri = 'mongodb://localhost/db'
73+
mongo_uri = 'mongodb://localhost/test'
7474

7575
app.config['MONGODB_SETTINGS'] = {
7676
'host': mongo_uri,

dependencies.html.md.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ Now run this command in your local directory to install the dependencies, prepar
3939

4040
<pre class="terminal">
4141
$ pip install -r requirements.txt
42-
Collecting Flask==0.10 (from -r requirements.txt (line 1))
42+
Collecting Flask>=0.10 (from -r requirements.txt (line 1))
4343
Downloading Flask-0.10.tar.gz (544kB)
4444

4545
...
4646
</pre>
4747

4848
Once dependencies are installed, you will be ready to run your app locally.
4949

50-
Upon running `cf push`, we will also push our whole dependencies folder `venv`. Since Cloud Foundry runs `pip install -r requirements.txt` anyways, this is redunant and should be omitted to save bandwidth and even more importantly: time. You can create a `.cfignore` file which works just like a `.gitignore` file and which tells Cloud Foundry what files should be excluded when pushing. Let's create a `.cfignore` file and exclude the `venv`:
50+
Upon running `cf push`, we will also push our whole virtual environment folder `venv`. Since Cloud Foundry runs `pip install -r requirements.txt` anyways, this is redunant and should be omitted to save bandwidth and even more importantly: time. You can create a `.cfignore` file which works just like a `.gitignore` file and which tells Cloud Foundry what files should be excluded when pushing. Let's create a `.cfignore` file and exclude the `venv` folder:
5151

5252
```
5353
venv
5454
```
5555

5656
<p class="note">
57-
<strong>Note</strong>: Cloud Foundry uses the latest version of Python 2.7 by default. To change that, create a `runtime.txt` file and put the respective version number into it. Be aware however, that Cloud Foundry only accepts the version specified <a href="https://github.com/cloudfoundry/python-buildpack/blob/master/manifest.yml" target="_blank">here</a>.
57+
<strong>Note</strong>: Cloud Foundry uses the latest version of Python 2.7 by default. To change that, create a <code>runtime.txt</code> file and put the respective version number into it. Be aware however, that Cloud Foundry only accepts the version specified <a href="https://github.com/cloudfoundry/python-buildpack/blob/master/manifest.yml" target="_blank">here</a>.
5858
</p>
5959

6060
<div style="text-align:center;margin:3em;">

environment.html.md.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Restaging app my-python-app in org MyOrg / space MySpace as user@mydomain.com...
2828
...
2929
</pre>
3030

31-
All environment variables are accessed using `os.getenv('ENV_VARIABLE')` or `os.environ('ENV_VARIABLE')` from within your Python app. Make sure you have an `import os` statement in your file to be able to use this method.
31+
All environment variables are accessed using `os.getenv('ENV_VARIABLE')` or `os.environ('ENV_VARIABLE')` from within your Python app. Make sure you have an `import os` statement in your file to be able to use these methods.
3232

3333
<div style="text-align:center;margin:3em;">
3434
<a href="./bind-service.html" class="btn btn-primary">I've set my environment variable</a>

push-changes.html.md.erb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,19 @@ In this step you’ll learn how to propagate a local change to the application t
1010
Change the `return` property in the `app.py` file to 'I am awesome!'. Your final result should look something like this:
1111

1212
```python
13-
"""CF Sample App Python"""
14-
1513
from flask import Flask
1614
import os
1715

1816
app = Flask(__name__)
1917

20-
port = int(os.getenv("PORT", "3000"))
18+
port = int(os.getenv('PORT', '3000'))
2119

2220
@app.route('/')
2321
def hello_world():
24-
return 'I am awesome!'
22+
return 'I am awesome!.'
2523

2624
if __name__ == '__main__':
2725
app.run(host='0.0.0.0', port=port)
28-
2926
```
3027

3128
Now test locally:

0 commit comments

Comments
 (0)