I want to create rest api for my app with Flask. Is It possible to run flask with base route fe. localhost:5000/webservice that
@app.route('/users')
will handle localhost:5000/webservice/users?
I want to create rest api for my app with Flask. Is It possible to run flask with base route fe. localhost:5000/webservice that
@app.route('/users')
will handle localhost:5000/webservice/users?
Use Flask blueprints. When registering the blueprint you can add a url prefix.
app.register_blueprint(restapi, url_prefix='/webservice')
Here is a link to the flask blueprint docs: Flask Blueprints