0

With Express, I am trying to acess relative path (css/..., assets/...) inside HTML file.

I can't use express.static() because the HTML file is located in a dynamically generated folder, with a hash as its name.

There are many folders with a different set of files inside, these folders are in "public/assets/template/file/tmp".

enter image description here

The server is trying to access these files based on what was defined in express.static, which was "path.join(__dirname,'public')", in order to handle other files in the project.

The public folder (which is in the project root) looks like this:

enter image description here

The index.html head:

enter image description here

I couldn't think of anything to do in this current situation, perhaps set a different express.static when accessing files in the dynamically generated folder, but it doesn't look like the best approach (not even sure if it's possible).

0 Answers0