Created
January 21, 2019 11:11
-
-
Save pablocattaneo/a3cafaaa10118a37ff0698b397350269 to your computer and use it in GitHub Desktop.
How to serve images in Express? #node #express Source: https://www.udemy.com/nodejs-the-complete-guide/learn/v4/t/lecture/12036704?start=165
https://expressjs.com/en/4x/api.html#express.static
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use('/images', express.static(path.join(__dirname, path_folder_storaging_images))) | |
// Example | |
const path = require('path') | |
app.use('/images', express.static(path.join(__dirname, 'images'))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment