I am using the below code to serve statics files(js, images, css):
app.use(express.static(path.join(__dirname, 'public'))); But now the images have been moved to some different location in the project i.e. outside the public directory (lets say. images).
So how do I differentiate between images and js,css files and serve them from different locations?
EDIT
I guess I have to read the request headers and then decide where to route the request. But looks a little dirty to me.