|
1 |
| -> Please help us improve and share your feedback! If you find better tutorials or links, please share them by opening a Pull Request. |
2 |
| -
|
3 | 1 | # HackYourFuture Node.js - Reading material week 2
|
4 | 2 |
|
5 | 3 | ## Last weeks Summary
|
6 |
| -Last week we looked at building an HTTP interface. The interface allowed us to get a state, and manipulate the state (add, subtract, reset). |
7 | 4 |
|
8 |
| -## Today's meal |
| 5 | +Last week we looked at building an HTTP interface. The interface allowed us to |
| 6 | +get a state, and manipulate the state (add, subtract, reset). |
| 7 | + |
| 8 | +## Agenda |
| 9 | + |
9 | 10 | 1. Recap last week
|
10 |
| -2. Homework |
| 11 | +2. Previous homework |
11 | 12 | 3. Questions & Answers (Q&A)
|
12 |
| -4. Other topics |
13 |
| -4. Persisting data beyond the lifetime of the app. |
14 |
| -5. Building a Command Line Interface / Working with arguments |
15 |
| -6. Using Node.JS's FileSystem (FS) |
| 13 | +4. Persisting data beyond the lifetime of the app |
| 14 | +5. Building a command line interface (CLI) |
| 15 | +6. Accessing file system with Node.js `fs` module |
16 | 16 | 7. CRUD operations
|
17 |
| -8. This week's assignment |
| 17 | +8. Homework |
18 | 18 |
|
19 | 19 | ## Reading material
|
20 | 20 |
|
21 |
| -### Something about ES6 I want you guys to know |
22 |
| -You may hear us talking about this "ES6" all the time. ES6 basically means: the latest version of JavaScript. It has a lot of really nice new features that makes life as developer easier. For you guys, you should remember the following: |
23 |
| -> During the NodeJS course, we will teach you some ES6 features, like Fat Arrow. It's *extremely* important to know whether a function comes from ES6 or from an older version of JavaScript. Why? [Because browsers don't support every new feature just yet](http://kangax.github.io/compat-table/es6/). With Node, on the other hand, you can always control which version of Javascript is running, because it's running on your computer, not in the browser. Node Version 6.x that you are running supports most ES6. |
24 |
| -So in summary: if you're working on the frontend, you probably don't want to use es6 just yet. In backend, type node --version to see which version you are running, and make sure everyone on the team has the same version by adding "engine" to `package.json` like so: |
25 |
| - |
26 |
| -```js |
27 |
| -"dependencies": { |
28 |
| - ... |
29 |
| -}, |
30 |
| -"devDependencies": { |
31 |
| - ... |
32 |
| -}, |
33 |
| -"engines": { |
34 |
| - "node": ">=6.5.0" // this means you need 6.5 or higher |
35 |
| -}, |
36 |
| -``` |
37 |
| - |
38 |
| -### 1. ES6: Fat Arrow functions |
39 |
| -This is one example of how ES6 can help us write cleaner code. I'm adding this as first reading material because it's used a lot on the NodeJS documentation website, so it's a good idea to understand what this means. Bonus points if you write your callbacks this way. |
40 |
| -[Blogpost Sitepoint]([https://www.sitepoint.com/es6-arrow-functions-new-fat-concise-syntax-javascript/) |
41 |
| -[Video]([https://www.youtube.com/watch?v=J85lRtO_yjY) |
42 |
| - |
43 |
| -### 2. NodeJS Process: |
44 |
| -Don't have to remember everything in this video, just a nice outline |
| 21 | +### Node.js process: |
| 22 | + |
| 23 | +You Don't have to remember everything in this video, just a nice outline |
45 | 24 | [Egghead video tutorial](https://egghead.io/lessons/node-js-the-node-js-process-object)
|
46 | 25 | Only read the part about "process.argv"
|
47 | 26 | [Node.JS docs - process.argv](https://nodejs.org/docs/latest/api/process.html#process_process_argv)
|
48 | 27 |
|
49 |
| -### 3. NodeJS FS |
50 |
| -Only read the part about readFile, appendFile (you will need this in your assignment) |
51 |
| -[Node.JS docs - fs.readFile](https://nodejs.org/api/fs.html#fs_fs_readfile_file_options_callback) |
52 |
| -[Node.JS docs - fs.appendFile](https://nodejs.org/api/fs.html#fs_fs_appendfile_file_data_options_callback) |
| 28 | +### Node.js file system module `fs` |
| 29 | + |
| 30 | +[Main documentation](https://nodejs.org/docs/latest-v8.x/api/fs.html) |
| 31 | + |
| 32 | +[fs.readFile()](https://nodejs.org/docs/latest-v8.x/api/fs.html#fs_fs_readfile_path_options_callback) |
| 33 | +[fs.appendFile()](https://nodejs.org/docs/latest-v8.x/api/fs.html#fs_fs_appendfile_file_data_options_callback) |
| 34 | + |
| 35 | +### Node Fundamentals |
53 | 36 |
|
54 |
| -### 4. Node Fundamentals |
55 | 37 | Read parts:
|
56 | 38 | - 3.1, 3.2
|
57 | 39 | - 4.1, 4.3
|
58 | 40 | [Airpair tutorial](https://www.airpair.com/javascript/node-js-tutorial#3-node-fundamentals)
|
59 | 41 |
|
60 | 42 | ## As you finish that up, don’t forget to watch next week’s video playlist to prepare for Express.
|
61 |
| ->You’ll find it here: [Lynda :information_desk_person:](https://www.lynda.com/SharedPlaylist/e8a2fec772bb462da38429629a34f3b7) |
| 43 | + |
| 44 | +You’ll find it here: [Lynda :information_desk_person:](https://www.lynda.com/SharedPlaylist/e8a2fec772bb462da38429629a34f3b7) |
0 commit comments