ip-getter
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2024-01-30 13:50:38 +10:00
parent a95d556e8c
commit ad6feb7afb

9
app.py
View File

@ -1,4 +1,5 @@
from flask import Flask, render_template, request from flask import Flask, render_template, request, jsonify
from flask_assets import Bundle, Environment from flask_assets import Bundle, Environment
from arango import ArangoClient from arango import ArangoClient
from minio import Minio from minio import Minio
@ -35,6 +36,12 @@ print(boards0)
board_list = [ k['_key'] for k in boards0] board_list = [ k['_key'] for k in boards0]
@app.route("/get_my_ip")
def get_my_ip():
return jsonify({'ip': request.remote_addr}), 200
@app.route('/liveness') @app.route('/liveness')
def healthx(): def healthx():
return "<h1><center>Liveness check completed</center><h1>" return "<h1><center>Liveness check completed</center><h1>"