w06 More fun with APIs

Request body and middleware

2022-02-22T15:30:00-05:00

Agenda

  1. Questions about a99
  2. Review endpoints
  3. Middleware
  4. Request body

Slides

https://comp426-2022-spring.github.io/slides/w06-00.html

req variables

Request (req object)

Middleware

Using middleware

Writing middleware for use in Express apps

What is middleware in Express.js?

How to save logs to files instead of showing it to the console in Node.js

Curl

Run Curl Commands Online

How do I post JSON request body with Curl?

Nodemon

Nodemon is like browsersync but for your Node apps.

nodemon

Notes

Logging and error handling

2022-02-24T15:30:00-05:00

Agenda

  1. regex
  2. Why log?
  3. What do we log?
  4. How to log?

Slides

https://comp426-2022-spring.github.io/slides/w06-01.html

Logs

Access and error logs - Loggly

Log file formats

Common Log Format (NCSA)

How to save logs to files instead of showing it to the console in Jode.js? - Melvin George

Log Levels - sumo logic

Understanding logging levels - Rafal Kuć

regex

Regex tutorial - Jonny Fox

regular expressions 101

Regex Crossword

Notes