Answer the question
In order to leave comments, you need to log in
How to prefix express.js virtual path?
Getting started with express.js
I do everything according to the instructions, but an attempt to display an image with the path virt prefix gives a 404 error. (Without the prefix, everything is displayed fine, even after writing
app.use('/static', express.static('public'));
or app.use('/static', express.static) into the app.js file (__dirname + '/public'));
What are the options to fix this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question