Mapservice Webclient
====================

Production environment
----------------------

The process to install the webapp in production mode contains the steps
 1. build the nodejs app
 2. copy the result to a webserver
 3. configure the webserver to serve the webapp

Building the webapp
*******************

We recommend to use our debian package. If it is not applicable for you,
follow this instructions to set it up on your own.

For this commands to work, you need node.js to be installed.

At first you need to install all node dependencies. To do so, execute the
following code in ``src/mapservice-webclient``:

.. code-block:: console

  npm install

To build the webapp run the following code in the same folder:

.. code-block:: console

  ng build --prod

Copy the result to a webserver
******************************

Configure the webserver
***********************

Development environment
-----------------------

The first step is to install all the needed dependencies. To do so run the
following command in ``src/mapservice-webclient`` (you need node.js
installed!) to install all node dependencies:

.. code-block:: console

  npm install

To start the development server run:

.. code-block:: console

  ng serve
  
Please start the mapservice also and than visit http://localhost:4200
in your browser. If you started :doc:`../executables/gnuboat-dev-mapservice`
in development mode, you can login with user ``jane`` and ``testpass``.
