-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
In Express, one can use app.use and express.static to bind the absolute directory path such as user/home/nodeproject/public to a shortcut: /public, so that html can locate files using a relative path.
For an example expressApp.use('/public', require('express').static(process.cwd() + '/public')); With this I should be able to to display an image using a reative path in my html file, <img src="/public/img/goat.jpg" alt="chilling with a goat">. In the docs, can you show where app.use and express.static should be used ? I tried the init method on the config/web.js file, but it doesn't work.
Metadata
Metadata
Assignees
Labels
No labels