How are you?
I'm trying to maintain two services on the same flask web server: A React client (available in "/") and a RestFull API (available in "/api/").
However, all routes are directed to the client and I cannot register the Blueprint to "/api".
@app.route('/', defaults={'path': ""})
@app.route('/<path:path>')
def client_route(path):
return 'Client'
app.register_blueprint(routes, url_prefix="/api")
""" Registro de rotas da aplicação """
I need routes starting with "/api" to call the API routes, while all other routes (*) call Client React.
Can anybody help me??