On Mon, Jun 20, 2016 at 9:37 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi
Is config.SERVER_MODE the best test here? pgAdmin4.py does it slightly differently now, to allow for users that run in desktop mode but prefer to use their browser (it, in theory, also allows you have multiple configurations (users) by using server mode on the desktop):
# Start the web server. The port number should have already been set by the # runtime if we're running in desktop mode, otherwise we'll just use the # Flask default. PGADMIN_RUNTIME = False if 'PGADMIN_PORT' in globals(): app.logger.debug('Running under the desktop runtime, port: %s', globals()['PGADMIN_PORT']) server_port = int(globals()['PGADMIN_PORT']) PGADMIN_RUNTIME = True
If user has environment variable PGADMIN_PORT to some port, it will give the same result, isn't it?
Do you think - we should check for both PGADMIN_RUNTIME and config.SERVER_MODE?