In this video, learn how to add file serving with Express on your server and then add an image serving through a public and then a specific folder.
- [Instructor] There will be times that you…need to provide static files to your clients;…Images, PDFs, downloadable files are all great examples.…But the idea of static files doesn't end there.…Non dynamic files such as CSS, HTML,…and any other static file needed can be hosted this way.…You can use it any way you want.…Let me demonstrate.…So the first thing we need to do is open the exercise files,…and also open the app here.…
So the Express app folder, click on it,…and then create two folders. One.…So right click new folder and call this one public.…And then right click new folder and call this one images.…And what we'll do is basically is click on resources…in the exercise files and grab rocket first.…So copy, so Command+C.…
And then put this one in the images.…So paste.…And then grab tent.…So Command+C for copy.…And then put this one in the public so Command+V.…Or right click paste.…And then you can close all this.…And lets to go to VS code and I'm going to show you…how you can load static files inside of your server.…
- Creating a basic data endpoint
- Routing with Express
- Adding a static route for file serving
- Basic middleware with Express
- Built-in middleware and error-handling middleware
- Debugging in an Express application
- Security best practices with Express
Skill Level Beginner
1. Setting Up Express
2. Getting Started
3. Routing with Express
4. Middleware with Express
5. Advanced Topics in Express
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.