python - Flask base route -


this question has answer here:

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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -