OMERO.web deployment for developers
===================================

Getting set up
--------------

You will need to have an OMERO server running that you can connect to. This
will typically be on your own machine, although you can also connect to an
external OMERO server. You can add the server to the
:property:`omero.web.server_list` and choose that server when you log in.
You should enable :property:`omero.web.debug` and start a lightweight
development Web server on your local machine.

Using the lightweight development server on Unix
------------------------------------------------

All that is required to use the Django lightweight development server
is to set the :property:`omero.web.application_server` configuration option,
turn :property:`omero.web.debug` on and start the server up:

::

    $ bin/omero config set omero.web.application_server development
    $ bin/omero config set omero.web.debug True
    $ bin/omero web start
    INFO:__main__:Application Starting...
    INFO:root:Processing custom settings for module omeroweb.settings
    ...
    Validating models...

    0 errors found
    Django version 1.6, using settings 'omeroweb.settings'
    Starting development server at http://0.0.0.0:4080/
    Quit the server with CONTROL-C.

Using the lightweight development server on Windows
---------------------------------------------------

All that is required to use the Django lightweight development server
is to set the :property:`omero.web.application_server` configuration option, turn
Debugging on and start the server up:

::

    C:\omero_dist>bin\omero config set omero.web.application_server development
    C:\omero_dist>bin\omero config set omero.web.debug True
    C:\omero_dist>bin\omero web start
    INFO:__main__:Application Starting...
    INFO:root:Processing custom settings for module omeroweb.settings
    ...
    Validating models...

    0 errors found
    Django version 1.6, using settings 'omeroweb.settings'
    Starting development server at http://0.0.0.0:4080/
    Quit the server with CTRL-BREAK.

Using FastCGI (Unix/Linux)
--------------------------

For convenience you may wish to run a web server under your local user account
instead of using a system server for testing. Install Nginx
(See :doc:`/sysadmins/unix/install-web`) but generate a configuration file
using the following command:

::

    $ bin/omero web config nginx-development > nginx-development.conf

Start nginx, and the Django FASTCGI workers:

::

    $ nginx -c $PWD/nginx-development.conf
    $ bin/omero web start

Next: Get started by :doc:`/developers/Web/CreateApp`....