Skip to content

Commit

Permalink
Update quickstart.rst to include example of passing server arguments (#…
Browse files Browse the repository at this point in the history
…1645)

Changes proposed in this pull request:
- Updated the docs such that it comes with an example for passing server
arguments and serving static files

---------

Co-authored-by: Ruwann <ruwan.lambrichts@ml6.eu>
  • Loading branch information
rkrishnasanka and Ruwann committed Mar 3, 2023
1 parent c257f04 commit ab94e2a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ to ``tornado`` or ``gevent``:
app = connexion.FlaskApp(__name__, port = 8080, specification_dir='openapi/', server='tornado')
Additionally, you can pass the parameters for the corresponding server as a dictionary using the `server_args` parameter. For example, in a scenario where you're serving static content, you can pass the parameters as follows:

.. code-block:: python
import connexion
app = connexion.FlaskApp(
__name__,
port=8080,
specification_dir='openapi/',
server='flask',
server_args={'static_url_path': '/', 'static_folder': 'wherever/your/static/files/are'}
)
.. _Jinja2: http://jinja.pocoo.org/
.. _Tornado: http://www.tornadoweb.org/en/stable/
.. _gevent: http://www.gevent.org/

0 comments on commit ab94e2a

Please sign in to comment.