-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Originally, In main.py there is a function named hello_world
@app.route('/')
def hello_world():
return 'Hello, World!'
I added another function below
@app.route('/hello')
def hello_path():
return "HELLO FROM PATH"
So the full script is as follows:
from flask import Flask
app = Flask(__name__)
app.debug = True
@app.route('/')
def hello_world():
return 'Hello, World!'
@app.route('/hello')
def hello_path():
return "HELLO FROM PATH"
if __name__ == '__main__':
app.run()
When I run this on my localhost both endpoints work correctly and return their respective strings. However, after deploying via git to my azure website, I can only get the response from xxx.azurewebsites.net/
to work correctly (returns "Hello, World!"). When I try and hit xxx.azurewebsites.net/hello
I get a 404 error.
I'm not sure why it only works with the default route in the cloud when everything works fine locally. Is this a setup issue? Is there anyway I can debug the routing issues on Azure?
danistrebel, jtmott, osowskit, itsalif, suleymanov and 2 more
Metadata
Metadata
Assignees
Labels
No labels