Closed JimvandeVen closed 6 years ago
For the code to read the directory I looked into the code from Tim Ruiterkamp.
What does that mean exactly? Copy and paste it, use it as inspiration? Implement it directly?
I asked him for help, and he said he found a solution. I read his code, understood it and found that I could use it in my solution. I then looked for a method to implement his code into my own code. For this I rewrote some of the parts, and left the parts i could use.
Cooolio ๐
.gitignore
with node_modules
to keep them out of your reponpm-debug.log
file too. This gets created when your code errors out, and is mostly for single-use"
with '
to make it all the same, but that's nitpickingSomething went wrong in the order of your html on the /images
page. This is what your server responded with:
<h1>Dit zijn alle afbeeldingen die er zijn</h1><li>Sad_Face_Emoji_large.png</li><li>avatar.png</li> <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
</body>
</html>
https://github.com/JimvandeVen/static-file-server
I Found it quite hard to find out what to do to make the 'directory reader'. I feel like sometimes I don't know all the possibilities, and need to be shown how to do it. This makes it pretty tough to make a start sometimes.