mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 20:12:43 +00:00
23 lines
418 B
Python
23 lines
418 B
Python
from flask import Flask
|
|
import requests
|
|
|
|
app = Flask(__name__)
|
|
|
|
URL = "http://server-check:6000"
|
|
|
|
|
|
@app.route('/')
|
|
def doRequest():
|
|
return "it works"
|
|
|
|
@app.route('/check')
|
|
def itWorks():
|
|
return requests.get(URL).json()
|
|
|
|
@app.route('/find/<name>/<port>')
|
|
def findServer(name, port):
|
|
return requests.get("http://"+name+":"+port)
|
|
|
|
if __name__ == '__main__':
|
|
app.run(debug=True, host="0.0.0.0", port=5000)
|