Learning NodeJS

These are the activities included in the node sample project that we work on throughout the program. No prior NodeJS experience is required, but you should be comfortable with JavaScript.

Note that this project is not coherent. It's simply a mish-mash of activities to help students learn NodeJS and how it can be used for developing web applications.

Web 2

  1. Setting up the project
  2. File IO in NodeJS
  3. A Very Simple Web Server
  4. NPM
  5. Creating Custom Modules
  6. Getting Started with Express
  7. EJS Templates
  8. The body-parser Package
  9. OPTIONAL: The user-helpers module
  10. OPTIONAL: Unit Testing with Jest

Web 3

  1. OPTIONAL: Making the user-helpers asynchronous (callback hell)
  2. HTTP and Form Handling (http-sample-app.js & sample-form.html)
  3. File Uploads (file-upload.html & file-upload-sample-app.js)
  4. OPTIONAL: Test-driven Development Assignment - Artist Model Object

Web 4

  1. Middleware
  2. Error Handling
  3. Logging
  4. Environment Variables and dotenv
  5. Using bcrypt to Hash Passwords - Note: The users-helpers module must be completed before doing this actvity
  6. Cookies
  7. Sessions
  8. Organizing Routes into Separate Files
  9. Unit Testing with Jest - grading-helpers module
  10. Test-driven Development Assignment - Artist Model Object
  11. Helmut
  12. CORS
  13. Logging
  14. Documenting your API

Links to resources (for the Web 4 lessons):

  1. Using Middleware
  2. Middleware in Express JS
  3. Optimizing Middleware
  4. Express Error Handling
  5. Node Error Handling
  6. Another one on Express error handling
  7. NODE_ENV (environment variable)
  8. Unit Testing
  9. Hashing Securely
  10. Salting and Hashing
  11. Express cookies and sessions
  12. More info on cookies
  13. Session based authentication
  14. Storing session data in MySQL
  15. Securing JavaScript Apps
  16. Documenting your API