I can not figure out what is the relation between the route path and the assets folder which contain css style and images.
here is an example for what happening with me:
- Whenever i set the route path to be like this
'/something/something'
in a get function and render X-page for example as response, the X-page uses the css and images which exist in the assets folder.
- But when the route path become more than that like
'/something/something/something/something'
and render the same X-page, It doesn't use the assets folder.
I am using this line to serve the static files :
app.use('/assets', express.static('assets'));
And my files structure :
may anyone explain what is going on ?