NodeJS Essentials 27: Using Static Content

Publié le: 19 juin 2019
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne NodeJS Essentials 27: Using Static Content durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Code With Bubb 19 juin 2019, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,090 fois et il a aimé 23 téléspectateurs. Bon visionnage!