-
Notifications
You must be signed in to change notification settings - Fork 340
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I am trying to use restx alongside a traditional flask route.
However, I cannot get the default "/" route to work.
Running code below...
- http://localhost:5000/test shows swagger doc
- http://localhost:5000/hi loads 'hello'
- http://localhost:5000 returns 404
How can I fix the 404, and handle root path?
from flask import Flask
from flask_restx import Api
app = Flask(__name__)
#restx api
api = Api(app, doc='/test/')
@app.route('/hi', methods=['GET'])
def home1():
return 'hello'
@app.route('/', methods=['GET'])
def home2():
return 'hello'
if __name__ == '__main__':
app.run(debug=True)
FrostyX
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested