Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: what is suggested way to add endpoints to respond web pages ? #153

Closed
10000TB opened this issue Sep 23, 2020 · 2 comments
Closed
Labels

Comments

@10000TB
Copy link
Contributor

10000TB commented Sep 23, 2020

currently all API endpoints are under /api/v1/, what is suggested way to add route under root to render simple pages ? (under root)

say localhost/ -> renter some page
localhost/page2 -> some other page
etc.

But at the same time we have the API serve rup

@frol frol added the question label Sep 23, 2020
@frol
Copy link
Owner

frol commented Sep 23, 2020

You have access to the Flask app instance (app) in the init_app function in the modules, so you can register any Flask blueprint on it like it is done in OAuth2 module:

app.register_blueprint(views.auth_blueprint)

@frol frol closed this as completed Sep 23, 2020
@10000TB
Copy link
Contributor Author

10000TB commented Sep 26, 2020

thanks, I guess that still comes with /api/v1 prefix

it turns out setting up another container for a new web server, and using the revproxy (/deploy/stack2/revproxy) to route / to that web server solves my needs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants