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

front and back ends have conflicting urls #78

Open
ahdinosaur opened this issue Sep 14, 2017 · 0 comments
Open

front and back ends have conflicting urls #78

ahdinosaur opened this issue Sep 14, 2017 · 0 comments

Comments

@ahdinosaur
Copy link
Member

example: using the dogstack-example, i browse to /, sign in, then navigate to /dogs. everything is great, until i refresh the page and see an array of dog objects from the dogs service.

why does this happen?

the server api (back end) is not prefixed, so the dogs service is served by feathers-rest at /dogs. this conflicts with the common route for a page that shows all the dogs: /dogs.

this was re-introduced in 912d5a5, when i added feathers-rest. we've avoided this in Cobuy, purely by chance.

how do we solve this?

we should make a sub-app for all the services, which is prefixed with /api. then use this as the base url for the feathers client. however, we must ensure we handle this bug: feathersjs/feathers#232, which is the reason i avoided using a sub-app when earlier versions of dogstack (on a previous contract) used a sub-app but had annoying edge cases from this.

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

No branches or pull requests

1 participant