view main.py @ 93:48dabf4bf680

Make http_error_code a parameter of the MergeErrorResponse constructor. It defaults to 500, the value previously hard-coded in the call to the super class constructor. This change will allow us to specify other error codes in places where 500 is not useful. Part of mpuls/issue6009
author Bernhard Herzog <bh@intevation.de>
date Fri, 28 Apr 2017 19:06:14 +0200
parents dcf870775c26
children
line wrap: on
line source
# -*- coding: utf-8 -*-
if __name__ == "__main__":
    from odfcast import app

    server_name = app.config['SERVER_NAME']
    if server_name and ':' in server_name:
        host, port = server_name.rsplit(':', 1)
        port = int(port)
    else:
        port = 5000
        host = "127.0.0.1"

    app.run(host=host, port=port)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)