Please help us improve and share your feedback! If you find better tutorials or links, please share them by opening a Pull Request.
Last week we looked at building an HTTP interface. The interface allowed us to get a state, and manipulate the state (add, subtract, reset).
- Recap last week
- Homework
- Questions & Answers (Q&A)
- Other topics
- Persisting data beyond the lifetime of the app.
- Building a Command Line Interface / Working with arguments
- Using Node.JS's FileSystem (FS)
- CRUD operations
- This week's assignment
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:
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. 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. 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:
"dependencies": {
...
},
"devDependencies": {
...
},
"engines": {
"node": ">=6.5.0" // this means you need 6.5 or higher
},
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.
Blogpost Sitepoint
Video
Don't have to remember everything in this video, just a nice outline
Egghead video tutorial
Only read the part about "process.argv"
Node.JS docs - process.argv
Only read the part about readFile, appendFile (you will need this in your assignment)
Node.JS docs - fs.readFile
Node.JS docs - fs.appendFile
Read parts:
- 3.1, 3.2
- 4.1, 4.3 Airpair tutorial
You’ll find it here: Lynda 💁