Server Side Rendering with Vue.js 3

Modus Create, LLC
15 Oct 202018:09

Summary

TLDRIn this tutorial, the YouTuber dives into Vue 3's server-side rendering capabilities using the raw API. The goal is to create a Vue 3 application with the Vue CLI, render it on a server, and explore concepts with tools like Express and Webpack. The script guides through setting up an Express server, configuring Webpack for SSR, and using Vue's new APIs for SSR apps and rendering to string. The process involves building the app for Node.js, handling static files, and integrating the server-rendered HTML with client-side JavaScript, culminating in a fully server-rendered Vue 3 application.

Takeaways

  • πŸ˜€ The video is a tutorial on experimenting with Vue 3's server-side rendering (SSR) features using the raw API.
  • πŸ› οΈ The goal is to create a Vue 3 application with the Vue CLI and then render it on a server using Express and Webpack.
  • πŸ“ The presenter emphasizes focusing on concepts rather than building a complete SSR solution.
  • πŸ’» The process starts by setting up an Express server and creating a basic server.js file to handle HTTP requests and responses.
  • πŸ“₯ The tutorial includes installing necessary packages like Express and Webpack Node Externals.
  • πŸ”§ Configuration of Webpack is detailed, including setting the target to Node.js and adjusting the output library target.
  • πŸ“ Use of Webpack Manifest Plugin is highlighted to track emitted files, which is crucial for SSR.
  • 🚫 Disabling certain Webpack optimizations like code splitting and compression for SSR is discussed.
  • πŸ”„ The presenter shows how to modify the Vue CLI's webpack configuration for SSR by setting environment variables and using an allow list.
  • 🌐 The video covers using Vue 3's new APIs for SSR, such as `createSSRApp` and `renderToString`.
  • πŸ”§ The tutorial explains how to adapt the main.js file for SSR by creating a `main.server.js` and adjusting the Vue CLI configuration.
  • πŸ”„ The importance of serving static files like CSS from the Express server and using the manifest to locate them is covered.

Q & A

  • What is the main goal of the video script?

    -The main goal of the video script is to create a Vue 3 application using the Vue 3 CLI and then render that app on a server using server-side rendering (SSR) with the help of Express, Webpack, and Vue 3's SSR features.

  • What is the first step in setting up the server for SSR in Vue 3?

    -The first step is to install Express using npm i express and then create a new file called server.js to start setting up the server using Express.

  • Why is a new build required for SSR in Vue 3?

    -A new build is required for SSR because the application needs to be built in a way that it's compatible with Node.js, which involves setting specific Webpack configurations for server-side rendering.

  • What is the purpose of creating a view config.js file in the context of SSR?

    -The view config.js file is created to customize the Webpack configuration for SSR, including setting the target to Node.js, defining the library target, and using plugins like webpack-manifest-plugin to manage the emitted files.

  • What is the role of the webpack-manifest-plugin in the SSR build process?

    -The webpack-manifest-plugin is used to create a manifest file that lists all the emitted files by the Webpack build process, which is instrumental for referencing the correct files in the server-side rendering setup.

  • Why is the 'ssr' environment variable set in the Webpack configuration?

    -The 'ssr' environment variable is set to indicate that the Webpack build is for server-side rendering. It helps in conditionally applying SSR-specific configurations.

  • What changes are made to the Webpack configuration to disable browser-specific optimizations?

    -To disable browser-specific optimizations, the splitChunks and minimize options are set to false in the Webpack configuration, as these are not needed for Node.js server consumption.

  • How is the Vue 3 application prepared for SSR in the server.js file?

    -The Vue 3 application is prepared for SSR by using the createSSRApp function from Vue, which is then used to create an SSR application instance. The renderToString function from vue-server-renderer is used to render the app content as a string.

  • What modifications are made to the main.js file to accommodate SSR?

    -The main.js file is modified by removing the createApp and mount logic and instead exporting the app instance directly. This is because the SSR setup uses createSSRApp, which is incompatible with the createApp and mount approach.

  • How are static files like CSS and JavaScript handled in the Express server for SSR?

    -Static files are handled by using the express.static middleware in the Express server, which serves the files from the 'dist' folder for each file type (images, JavaScript, CSS, etc.).

  • What is the final step to verify that the SSR setup is working correctly?

    -The final step is to start the server and check the browser for the rendered application. Additionally, inspecting the network activity in the browser's developer tools to ensure that the server is sending the correct HTML response.

Outlines

00:00

πŸ˜€ Introduction to Vue 3 SSR Experiment

The script begins with an introduction to an experiment using Vue 3's server-side rendering (SSR) features. The goal is to create a Vue 3 application using the Vue CLI and render it on a server with the help of Express and Webpack. The focus is on exploring SSR concepts rather than building a complete SSR solution. The process starts by setting up a new Vue 3 application and installing Express to create a basic server that serves HTML content. The server is tested by running it on localhost:8080.

05:01

πŸ› οΈ Setting Up the SSR Build Configuration

The second paragraph delves into configuring the build process for SSR. It involves creating a 'vue.config.js' file to customize the Webpack configuration for server-side rendering, including setting the target to Node.js and adjusting the library target to commonjs2. The use of Webpack Manifest Plugin is introduced to track emitted files. Additionally, the script covers the installation and configuration of 'webpack-node-externals' to handle external dependencies and disabling certain Webpack optimizations that are unnecessary for SSR, such as code splitting and minification.

10:02

πŸ”§ Integrating Vue 3 SSR APIs and Server Rendering

This paragraph explains the process of integrating Vue 3's SSR APIs into the server setup. It starts with importing the necessary modules from Vue and setting up the server to consume the built application files, which are identified through the 'ssr-manifest.json'. The script discusses the use of 'createSSRApp' and 'renderToString' functions to create a server-side rendered application and render the app content to a string, respectively. It also touches on the incompatibility between the SSR APIs and the standard Vue mounting process, necessitating changes to the 'main.js' file for SSR compatibility.

15:05

🌐 Finalizing the SSR Setup and Testing

The final paragraph wraps up the SSR setup by focusing on serving static files and rendering the application content with CSS. It describes configuring the Express server to serve static files from the 'dist' directory and modifying the 'main.server.js' to export the app correctly for SSR. The script concludes with running the server, testing the SSR functionality in the browser, and ensuring that the rendered HTML is received from the server. The video script ends with a call to action for viewers to like, share, and subscribe for more content.

Mindmap

Keywords

πŸ’‘Vue 3

Vue 3 is the latest major version of the Vue.js framework, a progressive JavaScript framework for building user interfaces. It is known for its simplicity and flexibility. In the video, Vue 3 is the core technology being explored, with the script focusing on creating an application using its server-side rendering features.

πŸ’‘Server-Side Rendering (SSR)

Server-Side Rendering refers to the process of generating HTML on the server and sending it to the client, which improves the initial load time and SEO performance. In the video, the creator is experimenting with Vue 3's SSR capabilities to render the application on a server using Express.

πŸ’‘Express

Express is a minimal and flexible Node.js web application framework that provides a robust set of features for building single and multi-page, and hybrid web applications. The script mentions using Express to set up the server for the Vue 3 application's SSR.

πŸ’‘Webpack

Webpack is a static module bundler for modern JavaScript applications. It is used to bundle JavaScript files for use in a browser, and it can also transform, bundle, or package other web resources. The video discusses configuring Webpack for SSR by setting the target to Node.js and using plugins like Webpack Manifest Plugin.

πŸ’‘Vue CLI

Vue CLI is a command-line tool for scaffolding Vue.js projects. It provides an easy way to start new projects with pre-configured build setups. The script refers to using Vue CLI to create a new Vue 3 application and to build the project for SSR.

πŸ’‘Webpack Manifest Plugin

The Webpack Manifest Plugin is used to create a manifest of all the files emitted by the Webpack build process. In the video, it is used to track the files generated for SSR and to customize the output filename to 'ssr-manifest.json'.

πŸ’‘Node Externals

Node Externals is a Webpack concept that allows you to mark certain modules as externals, which means they won't be bundled into the final bundle but will be required at runtime from the node_modules directory. The script mentions adding 'node-externals' to prevent bundling of certain dependencies.

πŸ’‘Code Splitting

Code Splitting is a feature of Webpack that allows you to split your code into various bundles which can be loaded on demand or in parallel. The script discusses disabling code splitting for SSR, as it is not needed in a Node.js server environment.

πŸ’‘Vue Server Renderer

Vue Server Renderer is a package provided by the Vue.js framework that enables rendering a Vue application to HTML on the server. The script includes using 'vue-server-renderer' to render the Vue 3 application to a string that can be sent as HTML.

πŸ’‘SSR Manifest

The SSR Manifest is a file generated during the Webpack build process when SSR is enabled. It contains information about the application's JavaScript files, which are necessary for SSR. The video script describes using the 'ssr-manifest.json' to determine the correct entry file for the server.

πŸ’‘Environment Variables

Environment variables are dynamic-named values that can affect the way running processes will behave on a computer. In the video, setting the 'SSR' environment variable to '1' triggers the SSR build process for the Vue 3 application.

Highlights

Experimenting with Vue 3's server-side rendering features using the raw API for a fun and educational experience.

Creating a Vue 3 application with Vue CLI and exploring server-side rendering with Express and Webpack.

Building a server with Express and setting up server-side rendering by creating a server.js file.

Using the Vue 3 preview to start a new Vue 3 application and discussing the importance of server-side rendering.

Creating a new build for Node.js consumption and the significance of Webpack configuration for SSR.

Utilizing the Webpack Manifest Plugin to extract emitted files for SSR.

Setting up the environment variable 'ssr' to customize the Webpack configuration for server-side rendering.

Installing and configuring Webpack Node Externals to optimize the build process for SSR.

Disabling browser-specific optimizations like code splitting and compression for Node.js server consumption.

Investigating and disabling specific Vue CLI plugins to tailor the build for server-side rendering.

Building the application with the 'ssr' environment variable set to enable SSR build process.

Consuming the built files in Node.js and using the SSR manifest to understand the file structure.

Introducing two new APIs in Vue 3 for SSR: createSSRApp and renderToString.

Using createSSRApp to create a server-side rendered application and comparing it with the standard createApp.

Rendering the Vue 3 application to a string using renderToString for server-side rendering.

Modifying main.js to work with server-side rendering by creating main.server.js.

Adjusting the Webpack configuration to use the new main.server.js entry point.

Serving static files using Express for CSS and other assets to complete the SSR setup.

Successfully rendering the Vue 3 application on the server and viewing the HTML output.

Addressing the issue of missing CSS and linking the stylesheet using the manifest file.

Transcripts

play00:00

youtubers join me today

play00:03

and experimenting with the latest vue 3

play00:07

server side

play00:08

rendering features this is going to be a

play00:10

fun experiment

play00:11

with the raw api so come along

play00:18

so our goal for today is to create a

play00:21

view 3 application with u3 cli

play00:25

and then we are going to render that app

play00:27

on a server

play00:29

we are also going to use express and

play00:32

webpack and a lot of terminology

play00:35

my goal is to say focus so i'm not going

play00:38

to build the entire server side

play00:39

rendering solution

play00:41

i only want to explore the concepts okay

play00:44

so let's get started by creating a new

play00:47

view 3 application

play00:48

i'm using view 3 preview

play00:56

okay we are done jimmy and this is our

play00:58

regular view 3

play00:59

application i suggest that we start by

play01:02

creating the server because this is

play01:05

server side

play01:06

rendering so let's create the server i'm

play01:08

going to use express

play01:09

and to start using this i'm going to

play01:10

have to install it first npm i

play01:13

express and now i can create a new file

play01:16

i'm gonna call it server.js

play01:18

okay let's start with these with the

play01:20

servers so first

play01:21

thing first i gotta require express

play01:25

and then i'm going to instantiate a new

play01:27

server server

play01:28

is going to be new express okay

play01:32

and now i'm going to work with path so

play01:33

i'm going to use any path server

play01:35

and get any path so that's going to be

play01:38

any

play01:38

the usual request response

play01:43

and then that's a new function i'm going

play01:45

to create some html

play01:47

const html is and i have some html ready

play01:51

that's it and now i need to response and

play01:54

with html finally i gotta listen

play01:59

server dot listen on board 88

play02:03

okay so we have our server okay just to

play02:06

prove that the server is running

play02:08

i'm going to launch it in localhost 8080

play02:10

and it's sending hello

play02:12

now comes the hard part we need to

play02:14

create

play02:15

a new build in a way that it's built for

play02:18

node.js

play02:18

this is going to be very interesting if

play02:21

you're into learning

play02:22

about how things work underneath i'm

play02:24

going to create a new

play02:26

file view config.js

play02:30

so one of the exports i need to add

play02:33

is chain webpack this is going to be a

play02:36

function

play02:37

and the argument i'm going to call

play02:38

webpack config this is not a raw

play02:41

webpack config it's mostly abstracted

play02:43

well the first thing i want to do

play02:45

is i want to know that this is actually

play02:48

server

play02:49

side rendering i'm going to call this

play02:50

environment of variable ssr

play02:52

okay if it's not set then just don't do

play02:55

any of these

play02:56

customization and the first thing we are

play02:59

doing we need to

play03:00

set webpack configuration and it needs

play03:03

to target node.js

play03:04

target is node another very important

play03:07

thing to do

play03:08

is setting the library target so output

play03:11

dot library target is going to be common

play03:15

js2 there is a lot of information in the

play03:17

webpack build but there's also

play03:20

a way to extract all the emitted files

play03:22

and

play03:23

this is going to be instrumental for a

play03:25

cause

play03:26

okay so we're gonna be using the webpack

play03:29

manifest plugin okay so i'm going to

play03:32

install that first

play03:34

and as i know it's being installed i'm

play03:37

going to

play03:38

import it into this file as well const

play03:41

manifest plugin is webpack

play03:45

manifest plugin a lot of typing i know

play03:48

okay in here i need to say config

play03:50

plugin i'm going to give it a name for

play03:52

every plugin that i add or that we add

play03:54

we also give it an identifier or name if

play03:57

you will so this is going to be my

play03:59

manifest

play04:00

name and i'm going to use new

play04:04

manifest plugin we can just use this

play04:06

plugin without any configuration but i

play04:09

can also show you that

play04:10

there is useful information that we can

play04:12

be using with this

play04:14

plugin and the most useful things for

play04:17

now

play04:18

is going to be the file name option and

play04:20

here's why

play04:21

manifest.json is something that

play04:24

our view3 cli is going to create for

play04:28

pwa progressive web app so we're going

play04:30

to change the file name from

play04:32

manifest.json

play04:34

okay and this is the option file name

play04:36

ssr

play04:38

manifest now we know what this file is

play04:41

actually for

play04:42

and this is the first difficult thing

play04:45

the second thing is going to be adding

play04:48

node externals

play04:49

so webpack config.externals

play04:53

and i'm going to need to set it up there

play04:54

is the library for that too and it's

play04:56

called

play04:57

npmi webpack node

play05:00

externals that's it and now i can close

play05:03

the terminal for a little while

play05:04

so we have more room on this side i'm

play05:07

gonna need to import

play05:08

node externals so we are going to use

play05:12

directly like so okay if we go to the

play05:16

view server side rendering guide and

play05:18

this is the guide for

play05:20

vue version 2 we are going to notice

play05:22

that they do the same thing as the

play05:24

externals are node

play05:25

externals the same plugin right here

play05:29

node externals and say and this says do

play05:32

not

play05:33

externalize dependencies that need to be

play05:34

processed by webpack

play05:36

okay do not externalize means

play05:39

internalize

play05:40

and you can add more file types here

play05:43

like

play05:43

view files so let's just add this

play05:46

whitelist

play05:47

css or you know what else we can do

play05:50

we can say css or view

play05:53

this is good we're making good progress

play05:56

and now we are going to need to disable

play05:58

something so obviously

play06:00

optimizations we don't need to optimize

play06:02

this for the browser for the consumption

play06:05

in the browser and across the internet

play06:08

this is going to be locally consumed in

play06:09

a node.js server

play06:10

so why don't we just disable things like

play06:13

um

play06:14

compression makes sense right webpack

play06:17

config again

play06:18

dot optimization split chunks

play06:21

is going to be well false because we

play06:24

don't need code splitting so much in

play06:26

node.js and minimize is going to be

play06:30

false as well

play06:30

so i don't want any compression to

play06:32

happen for this to be successful i had

play06:34

to investigate

play06:35

the plugins that are used by vue cli

play06:38

and i'm going to disable a view namely

play06:40

delete

play06:41

hot module replacement i'm going to copy

play06:44

this line a few times because i'm going

play06:45

to be

play06:46

replacing a few more preload okay

play06:49

and then prefetch all this is

play06:52

useful for the browser progress okay

play06:55

let's make things simple and friendly

play06:59

errors yeah i don't need that i'm going

play07:01

to give you a little secret if you

play07:02

ever want to see what this webpack

play07:05

config

play07:06

or chain webpack config is going to look

play07:08

like in

play07:09

webpack then you can actually output it

play07:12

console.log

play07:14

okay webpack config dot to config

play07:17

and this is going to spit out the entire

play07:19

config i'm going to comment this out

play07:21

because we don't need to

play07:22

bother with that but this could be uh

play07:24

useful for you to debug stuff and maybe

play07:26

you're just interested in learning about

play07:27

webpack and let's give this a try and if

play07:29

this is successful

play07:31

then the application is going to be

play07:32

built for the server

play07:34

if you remember we need to set the ssr

play07:36

environmental variable

play07:37

and i can do that by setting ssr to for

play07:39

example one

play07:40

and then i'm going to just build as

play07:42

usual npm run build

play07:44

okay and this is our first issue and

play07:47

honestly you know

play07:48

this is me copy pasting from view too

play07:51

and obviously i copied

play07:53

this white list config but meanwhile

play07:56

this was changed to allow list

play07:58

let's do this again ssr is one npm run

play08:02

build

play08:03

and there it is beautiful so i have

play08:06

app.js

play08:08

and app.css what if i didn't set

play08:11

npm run build no ssr let's test this out

play08:15

and now i have chunk vendors

play08:18

in the app you see how code splitting is

play08:21

working because now we have a new

play08:23

chunk that's a result of code splitting

play08:25

that's the optimization that i was

play08:27

telling you about split chunks so split

play08:30

chunk is going to work

play08:31

when we just run npm run build but if

play08:33

you run this with

play08:35

ssr equals one and then npm run build

play08:38

then vendors is going to be bundled

play08:41

inside the app.js

play08:43

and now we need to consume this in node

play08:46

so take a look at the dist folder and we

play08:49

see

play08:50

ssr manifest you see all the files that

play08:54

were

play08:55

created we are going to focus on these

play08:58

two now going back to the server

play09:00

i'm going to close the terminal again

play09:02

going up

play09:03

for this to work we're going to be

play09:04

working with two new

play09:06

apis that come with view three

play09:09

okay the first one is going to be create

play09:12

a server-side rendering application or

play09:14

create ssr app that's the first one

play09:18

the second one is going to be

play09:21

render to string because we are going to

play09:24

be consuming strings

play09:25

to send that as html

play09:29

okay create ssr

play09:33

app and that comes with

play09:36

require view

play09:39

and create ssr app looks very similar

play09:43

to create app you see create app view

play09:46

create app dot mount application

play09:49

we are just not going to be mounting but

play09:51

we are going to be creating we create

play09:54

app that we import um then we need to

play09:58

import the app.js obviously how do we do

play10:01

that

play10:02

we don't know the name of appgs because

play10:06

app.js is just app.then hash.js

play10:10

how do we know which hash that's going

play10:12

to be exactly

play10:14

ssr manifest app.js becomes

play10:19

that file so we need to import the ssr

play10:21

manifest.json

play10:23

into our server.js okay

play10:27

manifest is going to be required

play10:31

okay dist and then ssr manifest

play10:36

json okay now we need to import the app

play10:38

from

play10:39

manifest but let's see what it is const

play10:42

app

play10:42

path okay is manifest

play10:47

let's get back to ssr manifest to see

play10:49

that app.js

play10:51

dot well i can't say dot

play10:54

app.js okay

play10:57

this is the path however as you see this

play11:00

is slash js

play11:01

slash app okay what i'm worried about is

play11:04

slash

play11:05

js so i need to properly consume the

play11:07

path

play11:08

i need to make sure that this is going

play11:09

to be under the distribution of this

play11:12

folder

play11:13

and not the root of my computer

play11:16

for that we use i like to put path in

play11:19

the front path is going to be require

play11:24

path so just before manifest i'm going

play11:26

to write path

play11:27

dot join i'm going to say this current

play11:29

directory

play11:31

their name and then go back to this

play11:35

or distribution this folder and then

play11:38

join

play11:39

the manifest.app.js and close that

play11:41

function call and now i'm going to

play11:42

require it

play11:43

app is require app path

play11:47

and i'm going to be using the default

play11:48

export somehow while i was writing

play11:51

vs code included path for me but i did

play11:54

that manually

play11:55

without seeing that okay what do we do

play11:57

with the app

play11:59

we create an ssr app of course

play12:02

const and then app now lowercase app

play12:06

is going to be create ssr app app let me

play12:10

show you

play12:11

why we are doing this let's compare with

play12:14

main.js you see import app

play12:17

from app create app okay we are doing

play12:20

the same thing

play12:21

we are importing app and we're creating

play12:24

it's not just app it's server-side

play12:26

rendered app

play12:28

and we put that inside the app reference

play12:31

so with this we created the application

play12:34

but we haven't

play12:36

rendered yet for this we are going to be

play12:39

using the server

play12:41

renderer that does all the work

play12:44

for us in the background it's so smart

play12:48

and it's so unbelievably fast

play12:51

we need to do two things close this

play12:53

because

play12:54

so much mess second thing we are going

play12:57

to

play12:58

be importing this or installing first

play13:00

npm

play13:01

i view server renderer as this is being

play13:06

installed i'm going to require it right

play13:08

away

play13:10

right under requiring view

play13:14

okay render to string

play13:18

is going to come from view

play13:23

server render

play13:26

okay this is all i needed and it

play13:29

installed i'm going to

play13:31

close this for now render to string i'm

play13:34

going to use now

play13:35

app content is render to string

play13:40

app as simple as that let me tell you

play13:42

there's a lot of stuff

play13:43

that happens underneath the hood in

play13:46

render 2

play13:47

string but eventually i'm going to get a

play13:50

string of app content

play13:51

and put it right here instead of

play13:55

hello this is going to be my app content

play13:57

but here's the catch

play13:59

because we use create ssr app

play14:02

in server.js can we

play14:05

also use create app can we also use

play14:09

mount now this is incompatible

play14:12

so we need to change the main.js

play14:16

logic so it doesn't do all that okay

play14:19

create app with dot mount that doesn't

play14:22

work with create ssr

play14:24

app so i'm going to copy and paste okay

play14:27

may not copy i'm going to name it main

play14:30

dot server okay main.server

play14:33

i'm going to remove create app

play14:36

and remove this line and all i need

play14:40

is to just to pass app.view okay

play14:43

export default app

play14:46

all i ever needed but i need to tell

play14:48

viewconfig

play14:50

how to use that main.server i'm going to

play14:52

go to the top because

play14:54

that deals with webpack config

play14:58

entry and this entry point is called app

play15:01

clear the existing value and add

play15:04

source main server dot yes

play15:08

okay this is not actually the same main

play15:10

dossier dodge yes

play15:12

okay and if i go to the terminal again

play15:14

i'm gonna

play15:15

use ssr npm run build

play15:19

let's see what happens good goody goody

play15:23

and now time for the truth server

play15:27

whoops node server okay

play15:30

going back to the browser i'm going to

play15:33

hello world

play15:34

reload and yes i see object promise

play15:38

you know why i see object promise

play15:41

because because this

play15:45

is a promise render to string is an

play15:48

asynchronous code

play15:49

so this is going to be an async function

play15:52

app content is a way to render to stream

play15:55

okay let's do that oh

play15:57

well we don't have to do that all over

play15:58

again just node server go back let's see

play16:01

does this work

play16:04

yes that works ha

play16:09

okay it kind of kind of works you know

play16:13

we don't have any css

play16:17

but i think by now you already figured

play16:20

this out and you know

play16:22

where to find the css so that's going to

play16:25

be a link

play16:26

and then that means it's a style sheet

play16:29

right

play16:29

and then we have some kind of href or

play16:32

position of it

play16:33

okay and then it comes from the manifest

play16:35

manifest

play16:38

and that's going to be have.css and we

play16:41

can close this

play16:42

proper now we need to tell express

play16:45

server

play16:46

to use these static files as statics

play16:50

so for every folder that we have here

play16:52

server

play16:54

dot use image and that's express static

play16:58

okay path join directory name

play17:02

and that's going to be distribution or

play17:04

dist

play17:05

image and i'm going to replicate that a

play17:08

few times

play17:10

okay and we have it for image and i'm

play17:12

going to have for js

play17:14

and i'm going to repeat that for css

play17:18

and one more favicon.ico

play17:22

all right and this is this is it i'm

play17:24

gonna save this

play17:26

and start the server again

play17:30

let's test this out

play17:33

that is it finally you know let's verify

play17:37

you know elements obviously but if i

play17:39

reload again go to network

play17:41

go to localhost and preview this is good

play17:44

response we actually do get

play17:47

html from the server wow

play17:51

if you think this is rewarding for you

play17:54

and for your friends feel free to share

play17:56

it

play17:56

like it subscribe that little bell icon

play18:00

and all that stuff

play18:01

thank you for sticking with me and see

play18:04

you again soon

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Vue 3SSRExpressWebpackServer-SideRenderingCodingTutorialAPIsNode.js