Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save morhekil/95403e0fd1660443ed6d8d93ae3c09ca to your computer and use it in GitHub Desktop.
Save morhekil/95403e0fd1660443ed6d8d93ae3c09ca to your computer and use it in GitHub Desktop.

Node.js Workshop

Prework:

  • Install node
  • Download repo and get it running
  • Sign up for trial account for lambda service

Day 1

Day 1 AM

  • 20m 9:00-9:20 | Lecture

  • 20m 9:20-9:40 | Code along

    • Read a file w/ readFileSync, print the information to the console as JSON
  • 10m 9:40-9:50 | Break

  • 30m 9:50-10:20 | Lecture

    • map (readdir, map over file, print it out)
    • package.json, npm and node_modules
    • promises, async/await
    • what non-blocking means
  • 30m 10:20-10:50 | Exercises

    • Install isomorphic-fetch
    • Make a request with isomorphic-fetch
      • write it to a file w/ writeFileSync
    • Parse a CSV file, transform it, log it
      • use stdin to pass the file name to the script
  • 10m 10:50-11:00 | Break

  • 30m 11:00-11:30 | Lecture

    • callbacks
    • callbacks vs promises
    • error handling in both
  • 30m 11:30-12:00 | Exercise

    • Redo previous exercises with callbacks instead of "sync" methods
    • Add error handling
    • ??? extra exercise for those who finish early
  • 60m 12:00-1:00 | Lunch

Day 1 PM

  • 30m 1:00-1:30 | Code Along

    • create an http server
      • hand rolled routes
  • 30m 1:30-2:00 | Exercise:

    • render CSV files as html tables at different routes
  • 10m 2:00-2:10 | Break

  • 50m 2:10-3:00 | Lecture

    • the request and response objects
    • static assets
    • middleware
    • body parser
    • gzip
    • templating libs
  • 10m 3:00-3:10 | Break

  • 40m 3:10-4:00 | Exercise

    • Build a flat file markdown blog

Day 2

Day 2 AM

  • 30m 9:00-9:30 | Lecture

    • nodemon
    • now / heroku and friends
  • 10m 9:30-9:40 | Code-a-long

    • Run nodemon
    • Deploy using now
    • tail logs
  • 10m 9:40-9:50 | Break

  • 40m 9:50-10:30 | Lecture

    • lambda / cloud functions (aws, azure, gcf)
  • 30m 10:30-11:00 | Exercise

    • Build cloud function that sends an email
    • Deploy it to a cloud provider
  • 10m 11:00-11:10 | Break

  • 50m 11:10-12:00 | Code-a-long

    • poke around in the cloud provider console
  • 60m 12:00-1:00 | Lunch

Day 2 PM

  • 30m 1:00-1:30 | Lecture

    • introduction to graphql
  • 40m 1:30-2:10 | Code-a-long

    • Build a graphql server/lambda
  • 10m 2:10-2:20 | Break

  • 30m 2:20-2:50 | Lecture

    • Hasura
    • Fetching data from the browser
  • 30m 2:50-3:20 | Exercise

    • Connect a React UI to Hasura
  • 10m 3:20-3:30 | Break

  • 30m 3:30 | Exercise

    • Server rendered React
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment