Learning node.js
This section contains resources for learning how to work with Node.js.
Note this is a living document and is constantly being updated. Some things may come and go over time.
Beginner
- Node.js
- NPM - Node Package Manager (Installed with Node.js)
- NVM - A tool for managing multiple versions of Node.js (MacOS Only)
- nvm-windows - Similar to NVM but for Windows
Installing Node and NPM
- Downloading and installing Node.js and npm (As of Fall 2019)
- Resolving EACCES permissions errors when installing packages globally - This can happen when running a command such as
npm install -g live-server
.
Documentation
- Node.js Documentation - Your primary reference for the Node.js API
Node Modules
- Node.js URL Module: URL Strings and URL Objects - This has a great diagram showing the URL structure and how to parse it using the Node.js API. This matters for routing a request to the correct destination in your Node server (app).
Books
- The Node Beginner Book
- Professional Node.js: Building Javascript Based Scalable Software by Pedro Teixera
Tutorials
Node.js Tutorials
- Node.js Tutorial in VS Code
- Nodeschool Workshopper List - These are cool. Short terminal-based interactive tutorials on various topics.
- Node.js Tutorial - Tutorialspoint tutorials that cover the Node API
- CSE 398 Node.js Tutorial - Great introductory tutorial using Node API to build up to why it makes sense to eventually use Express (Step 13).
- Node.js for Beginners
npm Tutorials
- npm Tutorial for Beginners - 2:30 mins
- npm crash course 1 - 24 mins
- npm crash course 2 - 42 mins
Intermediate
- Node Frameworks
- Express
- KeystoneJS - Node.js CMS & web app platform
Templating
Tutorials
MVC
- How to Build and Structure a Node.js MVC Application - A great tutorial for building a notes board app. This doesn't use Express to build the app, it uses another framework called Hapi.js. Either framework most definitely simplifies the implementation of an app like this.
Express Tutorials
- Express Tutorial - By tutorialspoint
Websocket Tutorials
- Websockets Tutorial - By tutorialspoint
Passport.js Tutorials
- Passport.js - Simple, unobtrusive authentication for Node.js
- Learn how to handle authentication with Node using Passport.js
- Easy Node Authentication: Setup and Local
- Local Authentication Using Passport in Node.js
Application Deployment
In order to deploy an application on a server out in the world you need to use a host that supports Node.js and how it runs. Node.js apps require a system that allows a Javascript runtime (process) to run all the time using a process management tool like PM2. This means a "shared host" like Bluehost or another service that offers budget shared hosting typically doesn't support running apps like this. Below are some tutorials from hosts that offer these kinds of servers.
Another important thing to mention is when you work with hosts like Digital Ocean or Heroku, you typically have to setup and configure the "server instance", which means you become the administrator responsible for installing and configuring the operating system (Ubuntu or another form of Linux or Windows) to be a web server. These hosts are providing whats called a "Virtual Private Server" aka a VPS with a dedicated IP address which you can think of like a small piece of a much larger server called the "cloud".
- Deploying on Digital Ocean
- Deploying on Heroku
- Getting Started on Heroku with Node.js - Follow this to go from having no Node app to deploying a Node app.
- Deploying Node.js Apps on Heroku - This includes all the steps you need to follow to deploy an existing application.