HI, I want to change the base context of the API from "/" to "/myownapi" please let me know how can I do it.
in the flask, I do something like this
from flask import Blueprint, url_for
from flask_restplus import Api
from configuration import config
from configuration.logger import debug, error, warning
blueprint = Blueprint('sentiment', __name__, url_prefix='/myownapi', template_folder='templates')
The equivalent of Flask Blueprints are Routers, check out https://fastapi.tiangolo.com/tutorial/bigger-applications/ for more info.
If you want to mount an entire application under a path I believe you need to make it a sub application like in https://fastapi.tiangolo.com/advanced/sub-applications-proxy/ .
Hopefully one of those gets you what you need!
Thanks, I am looking for the sub-application proxy option
Thanks for the help here @dbanty ! :clap: :bow:
Thanks for reporting back and closing the issue @Bhanu88 :+1:
If you want to mount an entire application under a path I believe you need to make it a sub application like in https://fastapi.tiangolo.com/advanced/sub-applications-proxy/ .
This link is broken (as at Dec 2020) - try https://fastapi.tiangolo.com/advanced/behind-a-proxy/
Most helpful comment
This link is broken (as at Dec 2020) - try https://fastapi.tiangolo.com/advanced/behind-a-proxy/