express icon indicating copy to clipboard operation
express copied to clipboard

MIME Type error for static directory.

Open tufanobenjamin opened this issue 9 months ago • 1 comments

Hey so i have a strange problem. I have two react apps on the same express server that I'm serving as two different routes using app.use('/', express.static('./path_to_app')); and app.use('/map', express.static('./path_to_app_two'). there are a lot of other things going on with the express server and everything runs fine accept one react app works fine and the second one, well call map here, is sending css and js files with the wrong MIME type. Let me know what you want to see posted and I can supply it, or if this is a common issue aswell let me know. I have cleaned my cache and reinstalled all required modules. Its just strange that the same code works for one app but not the other.

tufanobenjamin avatar Aug 18 '23 21:08 tufanobenjamin

Hi @tufanobenjamin, so Express is incorrectly setting MIME type for the second react app? I would like to replicate this issue. Is there a way you can reveal the line of express code that is serving the css/js file?

jaitjacob avatar Dec 28 '23 10:12 jaitjacob