Skip to content

DigiPen-Network-Classes/cs261Lecture5

Repository files navigation

Node Intro Demo

The Most Hello World Program Ever!

See MostHelloWorld.js - demonstrate creating a node project (npm init). It prints out to console, very exciting.

Javascript is Dynamically Typed

Then go on to briefly introduce Dynamic Typing, at least as far as Node/JS is concerned:

  • Variables Do Not Have a Type at Declaration.
  • Types are Inferred by usage
  • Variables do have a type, but that type can be changed at runtime
  • Variables can be "coerced" into a different type! (This implicit type conversion is where most of the 'wat' comes from in javascript...)

See ItsDynamic.js for a short demo of this.

5.0 Hello World Wide Web (basic)

Basic Express web app. Then see 5.1 which cleans things up a bit.

5.2 Plus Moment

Another example, showing how to include and interact with more packages.

5.3 CS260 Server (Simplified)

Example of a TCP server, somewhat like what we used in CS 260.

About

Demo code for Lecture 5 of CS 261

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published