Skip to content

Application Templates

Lucas Rebscher edited this page Feb 1, 2021 · 13 revisions

Choosing Templates

If you create a new application, you have to choose the underlying templates used for the application generation.

Running harness-application --help will list the currently available templates:

usage: harness-application [-h] [-t TEMPLATES] name

Creates a new Application.

positional arguments:
  name                  Application name

optional arguments:
  -h, --help            show this help message and exit
  -t TEMPLATES, --template TEMPLATES
                        Add a template name. Available templates: - base (backend flask app based on openapi, always included) - webapp (webapp including backend and frontend) - db-postgres - db-neo4j - db-mongo

Available Templates

Base

  • The base template is always included and used as base for any other template.
  • The backend is a Python Flask application.
  • The Connexion library maps the APIs from the OpenAPI definition to the Flask routing.
  • Per default, Gunicorn serves the Flask app with 2 synchronous workers. Depending on the application requirements, you can update the number of workers or choose a different worker type.

Webapp

  • The webapp template consists builds upon the base template extends it by a React frontend application.
  • The generated frontend bundle is served by the Python backend.
  • Per default, React is used as a frontend application, but you are free to choose a different frontend technology.

Databases

  • db-postgres
  • db-neo4j
  • db-mongo