I am developing a nodejs express project.
In the project there is a public folder with many subfolders like js, css, images etc. Originally serving files from these folders was using this code:
app.use(express.static(__dirname + '/public'));
All requested files can be served by the server using this, but files in the js folder not found by the server. If I change the folde name from 'js' to somthing else then it works.
So for example this not found by server if the requested url is /js/work/work.js:
app.use('/js',express.static(path.join(__dirname, '/public/js')));
but this is found if requested url is /asd/work/work.js:
app.use('/asd',express.static(path.join(__dirname, '/public/asd')));
Earlier I was using Mac and Windows for development but now I switched to Ubuntu and then happed this strange thing.