NodeJS Essentials 27: Using Static Content

Veröffentlicht am: 19 Juni 2019
auf dem Kanal: Code With Bubb
1,090
23

In this tutorial, we'll look at how to use static files in an ExpressJS project.

In previous lessons we've looked at how to create Express JS templates and routes but you might also want to include stylesheets and external JavaScript files.

In this video, we'll look at how you can access the public folder in ExpressJS and server your own JS, CSS and images using the static feature of Express.

This also seems like a good time to introduce EJS partials which is a way to include other EJS files in your views. This allows you to create headers and footer for each of your views without having to copy and paste. Channel Handle @codebubb


Auf dieser Seite können Sie das Online-Video NodeJS Essentials 27: Using Static Content mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Code With Bubb 19 Juni 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,090 Mal angesehen und es wurde von 23 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!