Closed RobinStut closed 6 years ago
Hey @RobinStut!
Good job ๐
fs.existsSync
. These functions will block your whole server from executing anything. If the server is busy reading the files for person A, person B has to wait till it's done before the server will start looking for the files for person B./images
makes the server crash with the following error:
Error: EISDIR: illegal operation on a directory, read
This is due to the fact that you're trying to use the readFile
method on a directory. I think the method you're looking for here is fs.readdir
.
https://github.com/RobinStut/Listing
It was a good way to learn some basics about basic servers, and the first methods to get some information and push some data. It took me some time to get started, and the end result has still some problems which could not solve while submitting this issue. At least I learned some basics and I know I will improve myself in the upcomming weeks.