python - Flask base route -
this question has answer here:
- add prefix flask routes 6 answers
i want create rest api app flask. possible run flask base route fe. localhost:5000/webservice that
@app.route('/users')
will handle localhost:5000/webservice/users?
use flask blueprints. when registering blueprint can add url prefix.
app.register_blueprint(restapi, url_prefix='/webservice')
here link flask blueprint docs: flask blueprints
Comments
Post a Comment