I have azure VM (ubuntu 18.04) and i need to expose python api. My python code as shown below
from flask import Flask, request
import AskQuestions
import json
app = Flask(__name__)
@app.route('/answer', methods=['POST'])
def getAnswer():
requestData = request.form
print(requestData)
return AskQuestions.getAnswer(requestData)
if __name__ == '__main__':
app.run(host='localhost', port=8080)
Currently python server is running on http://localhost:8080.Can anyone guide me how can i give host to my VM url? Or I need a url which run my python api code for example from postman i can hit url and it runs my python code and send back a response.
