Get running python server IP address in Javascript -
i have python flask app running on server:
if __name__ == '__main__': port = int(os.environ.get("port", 6600)) app.run(host='0.0.0.0', port=port)
and have js script getting info app, don't want alter manually th ip or domain in js script every time deploy or alter domain i'm asking there way js know ip or hostname of python app ? here's structure: index.py <= main app static **index.html **script.js
thanks
register domain name , stick it. utilize domain name in javascript and/or config.
make sure registrar provides interface updating "a record" (ip address) , point @ server. whenever alter ip address, update record domain.
javascript python flask
No comments:
Post a Comment