/100-days-of-node

A Node.js curriculum for 100 days of code.

Primary LanguageJavaScript

100 Days of Node

A Node.js curriculum for 100 days of code. A 100 Days of Code challenge, strictly focusing on Node and Node-adjacent code.

I created this repository to learn the breadth and depth of Node. It became a source to help other developers learn more about using Node. Spend 100 days learning all about the in and outs of Node; what it can do; and where it's the best (and worst) technology to solve any particular challenge.

Any suggestions for little programs, code challenges, or applications that can showcase different features and abilities of Node that could be added to this list would be greatly appreciated...

The 100 Days of Node list (so far)

  1. "Hello World"
  2. Read environment variables from Node.js
  3. Write a script that adds two numbers
  4. Use the Node REPL
  5. Accept arguments from the command line
  6. Explore console commands
  7. Accept input on the command line
  8. Use node import/export modules
  9. Write an application that uses the Event Loop
  10. Write an application that uses Timers
  11. Write an application that uses Asynchronous Programming and Callbacks
  12. Write an application that uses Promises
  13. Write an application that uses Async and Await
  14. Write an application that uses the Node Event emitter
  15. Write a text-based Choose Your Own Adventure
  16. Write a text-based RPG combat module
  17. ? Errors: Error Handling in Node
  18. NPM: An introduction to npm
  19. NPM: Manage NPM Packages
  20. NPM: Update all the Node dependencies to their latest version
  21. NPM: Semantic Versioning
  22. NPM: Write an NPM Module
  23. NPM: Understanding package.json
  24. NPM: Understanding package-lock.json
  25. NPM: Work with global packages
  26. NPM: Link global packages
  27. NPM: Install npx: Node Package Runner
  28. CRUD: Writing Local Files
  29. CRUD: Reading Local Files
  30. CRUD: Delete Local Files
  31. CRUD: Accessing Directories
  32. CRUD: Find Local Files
  33. Server: Build a Web Server without Express?
  34. Server: Build a Webserver with Express
  35. HTTP Module: Make a GET request
  36. HTTP Module: Create a web server
  37. HTTP Module: Create a file server
  38. HTTP Module: Collect POST Data
  39. Socket: Create a Web Socket
  40. Socket: Broadcast messages with WebSocket
  41. Socket: Create a WebSocket with Socket.io
  42. Socket: Emit Socket.io Events
  43. Socket: Serve a static File
  44. Socket: Create your browser app
  45. Socket: Create a get message service
  46. Socket: Create a post message service
  47. Socket: Connect to Socket.io from the browser app
  48. Socket: Create a Socket.io event
  49. Streams: ?
  50. DB: Set up MongoDB
  51. DB: Mongo CRUD, Create
  52. DB: Mongo CRUD, Read
  53. DB: Mongo CRUD, Update
  54. DB: Mongo CRUD, Delete
  55. DB: SQL CRUD, Create
  56. DB: SQL CRUD, Read
  57. DB: SQL CRUD, Update
  58. DB: SQL CRUD, Delete
  59. Testing: Write Node tests with Jest
  60. Testing: Write Node tests with Jasmine
  61. Testing: Write Node tests (HTTP) with Supertest
  62. Microservice: Make a Catalog Service
  63. Microservice: Make a Promotions Service
  64. Microservice: Make an A/B Testing Service
  65. Microservice: Shopping Cart Service
  66. Microservice: Authentication Service
  67. Microservice: Using AWS/Serverless & Node.js Lambda
  68. Node Deployment: Set up Heroku
  69. Node Deployment: Set up AWS Beanstalk
  70. Node Deployment: Set up Azure
  71. Node Deployment: Set up Jenkins CI/CD
  72. Node Deployment: Set up Travis CI/CD
  73. Node Deployment: Set up Cirrcle CI/CD
  74. Node IoT: Real-Time Temperature Logging with Arduino, Node, and Plotly
  75. Node IoT: The Arduino Experimenter's Guide to Node.js
  76. Node IoT: Controlling a MotorBoat using Arduino and Node
  77. Node IoT: Cylon Arduino module?
  78. Node IoT: Arduino Node.js RC Car Driven the HTML5 Gamepad API
  79. Node IoT: How to Control Philips Hue Lights from an Arduino
  80. Node IoT: Easy Node.js and Web Sockets LED for Raspberry Pi
  81. Node IoT: Heimcontrol.js: Home Monitoring with Raspberry Pi and Node.js
  82. Node IoT: Build Your Own Smart TV usinf Node.js, Raspberry Pi, and Sockets.io
  83. Node IoT: Building a Garage Door Opener with Node and MQTT Using and Intel Edison
  84. Node IoT: Amazon's Guide to Make Your Own Raspberry Pi Alexa Device
  85. Node IoT: Interactive Smart Mirror
  86. Node Desktop: Use Electron
  87. ???

101. Profit!

000 "Hello World"

Let's start with an easy win!

  1. Install Node.js
  2. Create a directory named 000
  3. Create a script named hello-world.js
  4. Import http with require
  5. Serve a text respons of Hello World to port 8124
  6. Console.log an message saying what port is running

001 Read env variables

  1. Create a directory named 001
  2. Create a script named env.js
  3. Console.log the values of process.version and process.env

002 Write a script that adds two numbers

  1. Create a directory named 002
  2. Create a script named add.js
  3. Write a function that adds two numbers
  4. Console.log the results of adding two numbers

003 Use the Node REPL

REPL stands for Read Evaluate Print Loop. The REPL session provides a way to quickly test simple JavaScript code.

  1. Create a directory named 003
  2. Create a script named repl.js
  3. Write a script that enters a REPL session
  4. Have the script console.log a message on exiting the REPL session
  5. Run your REPL script
  6. Console.log the global variable
  7. Add a variable to the global variable
  8. Console.log your new variable

004 Accept arguments from the command line

Adding arguments into your node command (node arguments.js env=dev) will add them as strings to the process.argv array.

  1. Create a directory named 004
  2. Create a script named arguments.js
  3. Write a script to console.log all of the arguments passed in, but only the arguments that you pass in
  4. Run a command that passes in multiples arguments such as: node 004/arguments.js name=nathan surname=lilly devMode=test singularArg

005 Explore console commands

There is a built in console command in Node, much like you'd find in the browser.

  1. Create a directory named 005
  2. Create a script named console.js
  3. Write a script using the log method with variables passed in console.log('My %s has %d ears', 'cat', 2)
  4. Use the count method several times
  5. Use the clear method
  6. Use the count method at least one more time
  7. Reset the count
  8. Print the stack trace
  9. Print an error message with an error code
  10. Print a table
  11. Measure the time from the first console event to the end of the console events

006 Accept input on the command line

  1. Create a directory named 006
  2. Create a script named input.js
  3. Ask three questions and print their input
  4. Use a conditional to check the answer for at least one of the questions

007 Use node import/export modules

  1. Create a directory named 007
  2. Create a script named import.js
  3. Create a script named export.js
  4. Write an object into export.js
  5. Import the contents of export.js into 'import.js and log it to the console
  6. Add a function to the object
  7. Import and use the function

Resources