Closed DanielvandeVelde closed 6 years ago
Hey @DanielvandeVelde!
I don't think I put all the necessary hours in
oh oh oh oh oh oh oh oh oh oh oh
I really need my sleep to pay some attention during the class tomorrow
I feel like @wooorm appreciates you being awake during class ๐
Also, I should really look into the whole 'package.json' and '.gitignore' stuff. Seems like it would add something to my work.
Yes!
.html
). The file that is being read by fs.createReadStream
could potentially be inferred from the requested url. If you're up to the challenge and want to give it a shot, try merging all the if-statements in 1 block../files/images/avatar.png
). This causes the application to fail if it's started from another folder than the Server
folder. For example, I started the app by running node Server/index.js
/
. For example, /assets
works, but /assets/
doesn't.I feel like you got the basics down pretty well. I'm looking forward to your submission for the shelter assignment!
You could take a look at @MonikaaS' version, who coded the functionality in a way that it uses the url to fetch the files: https://github.com/MonikaaS/plain-server/blob/master/index.js
Listing
I had a lot of fun with this one, but it was kind of difficult figuring stuff out. I couldn't finish everything in time, however I don't think I put all the necessary hours in. Like the list stuff would just be nearly the same for-loop that we also did in the learnyounode-assignment, but I really need my sleep to pay some attention during the class tomorrow.
Also, I should really look into the whole 'package.json' and '.gitignore' stuff. Seems like it would add something to my work.
A link to the thing can be found by clicking anywhere on this run-on sentence