Share
Explore

How to connect the html page to the corresponding server.js file?

Statics!!

image.png

Note the use of the app.use( express.static(’directory name’ )

what ever we put into that directory will be pushed out to the browser

static directory is commonly used for
images
css
html
javascript files to run on the client side in the browser

when you want to ‘push’ static html from an express server, use the static middle ware
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.