@
@
@createm2016-12-16 14:22:15
redux
@createm, 2016-12-16 14:22:15

How to set route to "*" in loopback if I use server rendering?

I am using server rendering with loopback, react, redux. To render pages, I need to set a router for all "*" urls, except those generated by loopback (usually they are after "/api/*"), except for routes to statics, and other "__webpacK_hmr" ... So that if there is no router , then it rendered the page, and if the url was not found in react-router, then it sent an error. I put the route on the render front after the loopback boot, i.e. all routes should be loaded before "app.get('*', renderviews());" , but all the same, the request to the routes generated by the loopback goes to renderingviews(). How to make loopback-generated routes not renderviews?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question