Starting-up
###########
In the :doc:`/installation` section the sample ``index.html`` file generated by
``anpylar-application`` was shown. Let's recall it
.. code-block:: html
There is something which probably catches the eye:
No *Python* script is defined.
Being the question then: *How does the start-up process work?*
.. note:: Anyone familiar with *Brython* (the underlying technology) will
notice that a ``brython()`` call is needed to kickstart everything
when when the body is loaded.
This is all automatically managed by *AnPyLar* when everything is
ready.
Automatic Start-Up
******************
If no *Python* snippets or links to them are specified in ``index.html``,
*AnPyLar* will do the following for you
.. code-block:: python
import app
app.AppModule()
This can of course be overridden by the end user by using specific python
scripts which kickstart the application. The ``ìmport app ...`` auto-call
matches the code auto-generated by the *AnPyLar* command line interface.
User controlled Start-Up
************************
If *AnPyLar* detects that the user has specified a script it will honour it.
Just place script somewhere in ``index.html`` like in:
.. code-block:: html
.. note:: You can use ``text/python`` or ``text/python3`` for the type.
or place a link to the script as in
.. code-block:: html