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 https://github.com/MichaelPachec0/nodejs-project-night/blob/587003c525c8b48073a3bb6009a95d7e8da59723/server.js#L68
Im requesting a couple of changes