Skip to content

Latest commit

 

History

History
137 lines (81 loc) · 4.67 KB

README.md

File metadata and controls

137 lines (81 loc) · 4.67 KB

HackYourFuture Node.js Week 1

Agenda

  1. Recap last week
  2. Previous homework
  3. Questions & answers (Q&A)
  4. What is Node.js?
  5. Finding documentation
  6. Read-eval-print loop (REPL)
  7. Setting up a Node.js project using npm init and package.json
  8. Installing dependencies using npm install
    1. Local and global mode
  9. Importing modules using require
    1. Built-in, external modules and local files
  10. Building an HTTP server using built-in http module
    1. HTTP request methods
    2. HTTP response status codes
    3. Routing
    4. Example
  11. Homework

What is Node.js?

From Node.js' website:

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

Videos:

Introduction to Node.js

The V8 Engine.

Reading:

What is Node.js? What can you do with it? Why should you use it? estimated time: 10 minutes

Getting started with Node.js and npm

Reading:

A Beginner’s Guide to npm — the Node Package Manager

NPM tutorials. Follow chapters 1 - 10 estimated time: 4-6 hours

Finding documentation

Mozilla Developer Network

Node.js Documentation

Read-eval-print loop (REPL)

Documentation:

REPL

Setting up a Node.js project using npm init and package.json

Videos:

Node Package Manager

The package.json File

Documentation:

npm init

package.json

Installing dependencies using npm install

npm install

Importing modules using require

Videos:

Modules and require()

Module Patterns

Modules

More on Modules

require Function

Documentation:

Node.js modules

Building an HTTP server using built-in http module

Videos:

Clients & Servers

Creating a Server

Creating a Basic Server

Simple Web File Server

Basic Routing

Documentation:

http module documentation

HTTP request methods

HTTP response status codes

Control flow and events

An important term when making applications is control flow. You already know all about it. Read through this page and answer this question: how do we control flow in JavaScript?

Examples of control flow in JavaScript

Homework

Check README.md in homework subdirectory and use project in lecture for reference.

Prepare for the next lecture

Read the README.md for week 2.