1_Create a subdirectory called image in the project directory, and insert the summer.jpg file that you want to specify as your background.
Write the following code in 2_main.js to specify the directory to use static files.
app.use(express.static('image'))
3_ view.pug uses:
body {
background-image: url(summer.jpg);
}
https://stackoverflow.com/questions/32029461/using-background-images-in-jade/32029529 I figured it out here.
© 2024 OneMinuteCode. All rights reserved.