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

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -