Skip to content

Commit

Permalink
add flask note on naming
Browse files Browse the repository at this point in the history
  • Loading branch information
bryannho committed May 23, 2024
1 parent eae4974 commit fd7a5c0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/apps/flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ To deploy a Flask application in Ploomber Cloud you need:
- Your application file (`app.py`)
- A dependencies file (`requirements.txt`)

Ploomber Cloud **expects** your Flask application to be named as the variable `app` within the file `app.py`.
In order to run and deploy correctly, you must define the app like this basic example:

```py
# app.py

from flask import Flask

app = Flask(__name__) # Here we define the application as "app"

@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
```

## Testing locally

To test your app, you can use `gunicorn` locally:
Expand Down

0 comments on commit fd7a5c0

Please sign in to comment.