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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -