Course Content

  • TemplateDemos

Course Content


Clients download static files from the server in their current state. Create a new public directory. The name of the static directory is not part of the URL since Express looks up the files relative to the static directory.

Any file that is stored on a server and is presented to users the same way every time is known as static content. Static HTML files are not used to store dynamic webpages. Instead, in response to events such as user interactions or user logins, server-side programmes build an HTML file and send it to the web browser.

Most websites are no longer static pages, but rather files that are edited by javascript via modifying the DOM, hence I don't believe any html files should be called static. The files that make up your pages are still static. That is, you are not using server-side code to create them dynamically.

Use the express. static built-in middleware function in Express to serve static files like images, CSS files, and JavaScript scripts. The root option defines the directory from which static assets will be served. See express for more information on the choices argument.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere