D
D
dicem2019-04-28 18:53:49
Express.js
dicem, 2019-04-28 18:53:49

How does routing work in VUE + Express?

It is not entirely clear to me how to work with routing, when Express supports the so-called routing and there is a so-called vue-router in the front. Which of these things to use?
Is it possible to synchronize them somehow or use one thing? I beg you to tell me how to work in such a stack.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex, 2019-04-28
@dicem

usually, the presence of client-side routing implies that the server must return the same index.html to any url. then, already on the client in this index.html, the client router is initialized and, depending on the url in the address bar of the browser, it shows the user one or another interface or data (pages 404 and the like are also tied to the client router). server-side routing in this case can be used to create an endpoint for an API.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question