diff options
author | Galen Guyer <galen@galenguyer.com> | 2020-10-31 11:58:32 -0400 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2020-10-31 11:59:58 -0400 |
commit | 1009968ea0ca43ef1b1bc421f7694f1f70707948 (patch) | |
tree | f40c80a45095782290fb1af52bd7e683d6a74710 /README.md |
Initial commit
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..7919b4f --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# Flask wsgi bootstrap/demo + +This demo shows the use of gunicorn with flask. Original credit goes to [Max Meinhold](https://github.com/mxmeinhold/flask-gunicorn-demo). +It includes a basic Dockerfile, a linting demonstration using Pylint, and a Travis CI configuration for running linting. + +This is not an in depth guide in how these tools work, but a basic starting point and reference. + +Make sure to change my name and email if you use this template, especially in the license. + + +## Setup +Locally running this application should be pretty simple. + +1. (optional) Use a virtualenv + * Why use a venv? It isolates your dependencies and helps prevent version conflicts with other projects or system dependencies. + 1. `python3 -m venv venv` will create a venv in a directory named venv + 2. `source ./venv/bin/activate` will activate the venv +2. Install dependencies + * `pip install -r requirements.txt` +3. Run the app + * `gunicorn demo:APP --bind=localhost:5000` +4. Visit localhost:5000 in your web browser. + +## Linting +This demo uses pylint. +Travis CI will automatically run pylint on commits and PRs, but you can also run pylint manually, using `pylint demo`. +The pylint_quotes plugin is loaded by [the pylintrc](./.pylintrc) and will ensure standardised quotation mark formats. |