OKN-CollabNext / CollabNext_public

MIT License
0 stars 0 forks source link

https://collabnext.io/team doesn't work as a direct link #49

Open lewlefton opened 1 month ago

lewlefton commented 1 month ago

If you go to https://collabnext.io/ and click Team it works. If you reload that page it breaks. If you go to https://collabnext.io/team directly it fails.

chinardankhara commented 3 weeks ago

This is because our application is a SPA (Single Page Application). Steps to fix:

  1. Use BrowserRouter: We use BrowserRouter for our frontend which is necessary for serving arbitrary pages in our website so this requirement is already satisfied.
  2. Update Flask backend to serve non-API routes: We have pre-defined API routes being served from our backends. Other pages are not visible to the public web. We must edit the backend to serve non-API routes as well. While refactoring, we have to be careful to document our API serving routes and the others so we do not mess things up and cause an unintended crash.
lewlefton commented 2 weeks ago

Thanks @chinardankhara for this suggestion. Do you have a reference link for the above information so others can follow up from the same source?

I am moving this issue to @ksmith2002 since he will have the best view of how to update the Flask backend to serve non-API routes.