From the course: Learning Nuxt.js
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Server-side rendering and static site generation
From the course: Learning Nuxt.js
Server-side rendering and static site generation
- [Narrator] One thing is common when you talk about deployments in Nuxt. You either deploy a server-rendered app, or a statically-generated app. But what does all of this actually mean? I'll explain. Nuxt has two deployment strategies; server hosting and static hosting strategy. First, the server hosting strategy is used when you run your application entirely on a node JS server. When a user requests a page, the browser will request that page directly from the server. Nuxt will handle the request and send the results and all of its content back to the browser. You can use this hosting strategy when rendering HTML on each request to the server rather than add build time. Or if you want to extend the server with Nuxt middleware. To configure the server hosting, you need to register the target option in your Nuxt config file as server. And use the build command, MPM run, build or Nuxt build when you are running it on your…