M
M
mr_blaze2017-07-12 15:27:36
JavaScript
mr_blaze, 2017-07-12 15:27:36

How to create a SPA using Node.js and Vue.js?

Hello!
There is a website with a menu on it. The user clicks on a button in the menu (for example, Blog) and without reloading the page receives a list of posts from the database, but the site is normally indexed by SEO.
How to solve this problem using node.js and vue.js?
PS: Please show the code,
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vasily Nazarov, 2017-07-13
@vnaz

Read this question.
https://toster.ru/q/441372?e=5485607#answer_item_1...
In a nutshell:
SPA and SEO are generally incompatible, so if you need both, then two jobs are done: one is SPA, the second is SSR.
SSR for Vue .

S
senefu, 2017-07-12
@senefu

If you want to use Express for rendering Vue, then try https://github.com/express-vue/express-vue
The rest of the solutions have nothing to do with Express at all. With this bible you can use Vue instead of ejs.

A
Alexander, 2017-07-12
@boratsagdiev

Try looking at https://github.com/chrisvfritz/prerender-spa-plugin and https://www.npmjs.com/package/express-history-api-...

M
Mark Kim, 2017-07-20
@markiros

https://en.nuxtjs.org

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question