Open sohilpandya opened 7 years ago
@sohilpandya thanks. We use that object to get the content-types based on the extension - is there a better way to do this?
What you are doing is good, in the future you'll probably be better off using a module which makes this easier for you. hint -> serve-static
😉
In this file https://github.com/polyccon/Crumbs/blob/master/src/handler.js#L9-L16
You are defining the extensions, but what happens if you add png files, then add svg files to serve. You will constantly be adding to this list.
Have you thought about an alternative?
You could just split the url to get the ext.