diff --git a/README.md b/README.md index 83512e18f..d5bddcd2b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ > Please help us improve and share your feedback! If you find better tutorials -or links, please share them by [opening a pull request](https://github.com/HackYourFuture/Node.js/pulls). +or links, please share them by [opening a pull request](https://github.com/FooCoding/Node.js/pulls). -# HackYourFuture - Node.js +# Node.js This 3-week HYF Module is about Node.js. We can think of Node.js as "Javascript not running in a browser". This is what we mean by "backend", as in "backend @@ -26,8 +26,8 @@ Read first weeks's [README.md](week1/README.md). Reading: -Read Jim's summaries of [promises](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/promises.md) -and [async & await](https://github.com/HackYourFuture/fundamentals/blob/master/fundamentals/async_await.md) +Read Jim's summaries of [promises](https://github.com/FooCoding/fundamentals/blob/master/fundamentals/promises.md) +and [async & await](https://github.com/FooCoding/fundamentals/blob/master/fundamentals/async_await.md) from JavaScript module [Promises, async/await](http://javascript.info/async) @@ -47,11 +47,11 @@ instructions depending on your operating system: We will build on knowledge from the following HYF (sub)modules. If we feel we have gaps we should review the curriculum ourselves or ask a teacher to help. -- [JavaScript1](https://github.com/HackYourFuture/JavaScript1) -- [JavaScript2](https://github.com/HackYourFuture/JavaScript2) -- [JavaScript3](https://github.com/HackYourFuture/JavaScript3) -- [Git](https://github.com/HackYourFuture/Git) -- [Bash/Command Line Interface](https://github.com/HackYourFuture/CommandLine) +- [JavaScript1](https://github.com/FooCoding/JavaScript1) +- [JavaScript2](https://github.com/FooCoding/JavaScript2) +- [JavaScript3](https://github.com/FooCoding/JavaScript3) +- [Git](https://github.com/FooCoding/Git) +- [Bash/Command Line Interface](https://github.com/FooCoding/CommandLine) ## What will we learn? @@ -85,7 +85,7 @@ There are two reasons why we at HYF chose Node.js over others: Take a look at [this video](https://www.youtube.com/watch?v=-o0yomUVVpU) made by Daan, he explains how your homework needs to be handed in from now on. -Also review the [Git workflow material](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md) +Also review the [Git workflow material](https://github.com/FooCoding/Git/blob/master/Lecture-3.md) and use it as a reference. ## Rewatch previous lectures @@ -94,5 +94,5 @@ and use it as a reference. - Lecture 2 (Joost): https://www.youtube.com/watch?v=pY7IDaLX-no - Lecture 3 (Joost): https://www.youtube.com/watch?v=oeWCqKJsHtU&t=99s -*The HackYourFuture curriculum is subject to CC BY copyright. This means you can freely use our materials, but just make sure to give us credit for it :)* - +--- +Credit goes to [HackYourFuture](https://github.com/HackYourFuture) which this is based upon. diff --git a/week2/README.md b/week2/README.md index 3671c4dee..50c498e30 100644 --- a/week2/README.md +++ b/week2/README.md @@ -35,6 +35,13 @@ Documentation: [fs.appendFile()](https://nodejs.org/docs/latest-v8.x/api/fs.html#fs_fs_appendfile_file_data_options_callback) +### Working with streams in Node.js +[fs.readFile() vs fs.createReadStream()](https://medium.com/@dalaidunc/fs-readfile-vs-streams-to-read-text-files-in-node-js-5dd0710c80ea) + +[Node.js stream documentation](https://nodejs.org/api/stream.html) + +[Streams vs readFile and piping streams](https://www.freecodecamp.org/news/node-js-streams-everything-you-need-to-know-c9141306be93/) + ### Building a command line interface (CLI) [Node.js Process Documentation](https://nodejs.org/docs/latest-v8.x/api/process.html) diff --git a/week2/homework/README.md b/week2/homework/README.md index 163cade0b..4b69b04ff 100644 --- a/week2/homework/README.md +++ b/week2/homework/README.md @@ -64,6 +64,7 @@ node index.js reset ## Bonus assignment - Use JSON to store to-dos +- Read, write and remove todos to and from JSON files using streams. - Split each action (i.e. read, write, etc.) into a separate file - Use [commander](https://www.npmjs.com/package/commander) library to implement command line interface diff --git a/week3/README.md b/week3/README.md index 6cecaffbf..15e4634fa 100644 --- a/week3/README.md +++ b/week3/README.md @@ -117,6 +117,6 @@ Check [README.md](homework/README.md) in `homework` subdirectory. ## Prepare for the next module -Check out the [databases repository](https://github.com/HackYourFuture/databases) +Check out the [databases repository](https://github.com/FooCoding/databases) and find out how you can prepare for the first database lecture, Jason and Rob have provided a nice Lynda playlist so we can have a flying kick off. diff --git a/week3/homework/README.md b/week3/homework/README.md index ca7b75298..5fa76a3d3 100644 --- a/week3/homework/README.md +++ b/week3/homework/README.md @@ -5,23 +5,19 @@ Read through the code from the lecture, make sure you understand the flow of the program. -Add four more actions: +Add three more actions: ### `readTodo` (`GET /todos/:id`) - Get a single to-do with ID `:id` +Get a single to-do with ID `:id` ### `clearTodos` (`DELETE /todos`) - Clears the list of to-dos +Clears the list of to-dos -### `markAsDone` (`POST /todos/:id/done`) +### `patchTodo` (`PATCH /todos/:id`) - Sets the `done` flag of a single to-do to `true` - -### `markAsNotDone` (`DELETE /todos/:id/done`) - - Sets the `done` flag of a single to-do to `false` +Sets the `done` and/or `description` fields of a single to-do. ## Requirements