Tell the user where the app server is running.

This commit is contained in:
Dave Page 2016-06-14 12:00:06 +01:00
parent d87a6a15ac
commit 0f12defd20

View File

@ -42,8 +42,8 @@ if config.SERVER_MODE is True:
# Check if the database exists. If it does not, create it.
if not os.path.isfile(config.SQLITE_PATH):
setupfile = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'setup.py')
exec(open(setupfile).read())
'setup.py')
exec (open(setupfile).read())
##########################################################################
# Server starup
@ -70,6 +70,10 @@ else:
config.DEFAULT_SERVER_PORT)
server_port = config.DEFAULT_SERVER_PORT
print("Starting %s. Please navigate to http://localhost:%d in your browser." %
(config.APP_NAME, server_port))
sys.stdout.flush()
try:
app.run(
host=config.DEFAULT_SERVER,