Skip to content

A starting point to Docker deployable gunicorn flask rest API server

Notifications You must be signed in to change notification settings

basickler/FlaskRestBiolerplate

Repository files navigation

Flask REST Service Boilerplate

Losely based on a free codecamp page

You can find the code for that here

I've modified the structure a little bit "lot" to fit our needs.

Production

To run using gunicorn

venv/bin/gunicorn app

To use one of the configs

venv/bin/gunicorn --config gunicorn_config.py app

To start on a custom port (say from docker :P). Note command line takes precidence over config file.

venv/bin/gunicorn --config gunicorn_config.py --bind 0.0.0.0:10086 app

Testing and Dev

To run using flask

python3 manage.py run

To run testing scripts (not implemented by default)

python3 manage.py test

Using the manage.py framework you can do things like autoinit db connections and the like.

About

A starting point to Docker deployable gunicorn flask rest API server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published