Does nuxt need a server?
Asked Answered
E

1

7

I'm studying nuxt. I leave a question because I have a question while studying. nuxt can ssr, but ssr is known as server side rendering. Then, I wonder where the server is. Because vue is built on node, is the server automatically made into node server? And, how is SEO possible if we make it with nuxt? I understand that it is possible if you make html with MPA. However, using nuxt makes SEO possible. So, when you create a project with nuxt, does the client make it an MPA when it makes the first request?

Elvieelvin answered 25/9, 2019 at 0:44 Comment(0)
N
2
  • where the server is?

Depends... Nuxt include a node server (nuxt), but you can during the nuxt instalation merge them with other node server frameworks

  • when use nuxt alone or with other server-side framework?

Depends of your needs, knowledge and project.

For example I usually use nuxt alone, more apollo graphql it give me all I need. but for Shopify apps, the admin embed login is write for Koa and super easy to use so I prefers nuxt + koa when I develop this kind of app.

  • what means ssr?

server side rendering, the important thing is Rendering, that means nuxt (or nuxt + extra server-side framework) read the vue (js) code in the server and rendered them in Html code, after that it send the html to the client machine.

This is the reason why SEO is possible, when a web crawler visit the site it receive a fulfilled HTML page easy to read and clasify.

Nuxt has a really extensive and easy to understand guide, I recomend you follow them. Example you can use Head for edit the Header of the page,

Neon answered 26/9, 2019 at 4:50 Comment(3)
Thank you for your answer! However, here is more question. If I want to use nuxt only as the front end and Python as the back end, does it need a total of three servers as the Web server, node server, and backend server?Elvieelvin
depends... you can create a graphql or rest api with python and use vue apollo or axios to connect direct with frontend, nuxt wil be fine,Neon
but if you need something more complex in serverside, processing things before and after the frontend was renderes well you need mix nuxt with other server framwork as express, koa or hapiNeon

© 2022 - 2024 — McMap. All rights reserved.