COMP6080

Web Front-End Programming

Javascript - NodeJS

Demonstration

Let's demo together!

Let's write a simple NodeJS script that:

  • Reads in up to 20 dates in the format "YYYY/MM/DD" from argv
  • For each date, calculates how many days since that date have passed
  • Creates a list of keys:value pairs that store date:days-since-date
  • Outputs this as JSON to a file on the file system

Let's demo together!

Let's write a simple NodeJS script that:

  • Starts up a simple HTTP server with one GET route called "/scrape"
    • This route takes in a URL and a particular HTML tag to look for and count
    • This route returns a simple object with the number of times that tag appears on a webpage

Feedback

COMP6080 22T1 - Demo: Javascript - NodeJS

By haydensmith

COMP6080 22T1 - Demo: Javascript - NodeJS

  • 407