Answers for "error: cannot find module 'html' express"

0

error: cannot find module 'html' express

To render static files use the static middleware like so:
app.use(express.static(path.join(__dirname, 'public')));

This tells express to look for static files in the public directory 
of the application
Once you have specified this simply point your browser to the location 
of the file and it should display
Posted by: Guest on October-21-2021

Code answers related to "error: cannot find module 'html' express"

Code answers related to "Javascript"

Browse Popular Code Answers by Language