Commit 6e220c6f authored by Shayan Hajipour's avatar Shayan Hajipour
Browse files

debug: nce controller mock debugged

- redundant BASE_URL removed from endpoints
- ssl deactivated
- Health class removed
parent ebe90747
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -56,11 +56,6 @@ def log_request(logger: logging.Logger, response):
    return response


class Health(Resource):
    def get(self):
        return make_response(jsonify({}), 200)


def main():
    LOGGER.info("Starting...")

@@ -68,14 +63,13 @@ def main():
    app.after_request(functools.partial(log_request, LOGGER))

    api = Api(app, prefix=BASE_URL)
    api.add_resource(Health, "/")
    api.add_resource(Apps, BASE_URL + "/apps")
    api.add_resource(App, BASE_URL + "/application=<string:app_name>")
    api.add_resource(AppFlows, BASE_URL)
    api.add_resource(AppFlow, BASE_URL + "/app-flow=<string:app_name>")
    api.add_resource(Apps, "/apps")
    api.add_resource(App, "/apps/application=<string:app_name>")
    api.add_resource(AppFlows, "")
    api.add_resource(AppFlow, "/app-flow=<string:app_name>")

    LOGGER.info("Listening on {:s}...".format(str(STR_ENDPOINT)))
    app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT, ssl_context="adhoc")
    app.run(debug=True, host=BIND_ADDRESS, port=BIND_PORT)

    LOGGER.info("Bye")
    return 0