Regarding this line
|
let cType = fileTypes[file.split('.')[1]] //splits the string into an array of 2 elements, from wherever '.' is and returns the extension |
Im requesting a couple of changes
- Ideally the comment should be in its own line
- There can be some instances where files can have a . in a filename i.e file.extrabit.html, this can be fixed by breaking up the one liner setting a variable to the split method. We can then use length-1 to use the last entry in the array. This ensures that we only take the suffix (the extension) from the file path.
Regarding this line
nodejs-project-night/server.js
Line 68 in 587003c
Im requesting a couple of changes