Webapp ("Waterkennect")
=======================

dew_gwdata.webapp is a module which includes a web application providing access
to many of the functions of the underlying Python package, for those who are
not users of Python

Running the webapp
------------------

In a command shell (e.g. Miniforge Prompt) run this command:

.. code-block:: none

    dew_gwdata.webapp --host 127.0.0.1 --port 8000

Then visit http://127.0.0.1:8000/app in your web browser. The app should appear:

.. figure:: figures/webapp_homepage.png

Only you can see this page, as 127.0.0.1 is the network port known as "localhost"
i.e. only visible from the same computer.

To "broadcast" the app to other computers on your network, use the host 0.0.0.0
and a port which is manually opened -- at DEW there will be a firewall preventing
communication of this type between computers. The port 8191 has been specifically
opened on the Water Science modelling servers bunyip and neptune for this purpose.
So if you are on the bunyip server, and wish to broadcast the web application
to other users on port 8191, use this command:

.. code-block:: none 

    dew_gwdata.webapp --host 0.0.0.0 --port 8191

Then other users will be able to visit http://bunyip:8191/app to use the app.