the discovery service
This commit is contained in:
parent
c01c7ff2c2
commit
c6f997d2ed
1 changed files with 35 additions and 0 deletions
35
discovery/discovery.py
Normal file
35
discovery/discovery.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
from flask import Flask # PouR créer le service
|
||||
from flask import request # Pour faire des jolis "POST"
|
||||
import requests # Pour "request" un server "autre"
|
||||
|
||||
import json #return json : json.dumps(dico)
|
||||
|
||||
#MS
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
#app.config.from_object('config')
|
||||
|
||||
#URL
|
||||
cardManagerURL = "192.168.37.26:50000" #TODO
|
||||
iaURL = "192.168.37.158:50001"
|
||||
gameManagerURL = "192.168.37.69:50000"
|
||||
|
||||
|
||||
@app.route('/CardManager', methods=['GET'])
|
||||
def cardManager():
|
||||
return cardManagerURL
|
||||
|
||||
@app.route('/IA', methods=['GET'])
|
||||
def ia():
|
||||
return iaURL
|
||||
|
||||
|
||||
@app.route('/GameManager', methods=['GET'])
|
||||
def gameManager():
|
||||
return gameManagerURL
|
||||
|
||||
|
||||
|
||||
if( __name__ == "__main__"):
|
||||
app.run(host="0.0.0.0", port=50005, debug=True)
|
Loading…
Reference in a new issue