Completion of JS311

Mark Pustejovsky
2 min readOct 14, 2020

We are at the end of our JS311 class at

. We have learned how to create data bases, use Node.js Express servers, and how to deploy our projects.

Here are some questions we were asked to comment on this week.

  1. Can you explain the purpose of each type of HTTP Request when using a RESTful web service? The different types of HTTP requests are GET, POST, PUT, and DELETE.
  • GET — Retrieves data from the server.
  • POST — Typically used for creating a new entity, that does not currently exist in the database.
  • PUT — This is similar to POST, but used to update an existing entity in the database.
  • DELETE — Removes a resource from the database.

2. What’s a test pyramid? How can you implement it when talking about HTTP APIs? A test pyramid describes how test cases are written. To implement there should be a lot more low-level unit tests than high level end to end tests.

3. What is the “demultiplexer”? A demultiplexer is a notification interface that is used to handle concurrency in non-blocking I/O mode and collects every request in form of an event and queues each event in a queue. Thus, the demultiplexer provides the Event Queue, which we often hear.

4.What’s the difference between “blocking” and ‘non-blocking’ functions?Blocking and synchronous mean the same thing: you call the API, it hangs up the thread until it has some kind of answer and returns it to you. Non-blocking means that if an answer can’t be returned rapidly, the API returns immediately with an error and does nothing else.

5. What are the main security implementations within NodeJS? Security is paramount with any public facing application. Some security practices with Node.js are:

  • Use parameterized inputs to prevent injection attacks.
  • Use multi-factor authentication to prevent automated attacks.
  • Discard sensitive data after use.
  • Enforce access control on every request
  • Create fluid build pipelines for security patches

6. Explain the “path” module in NodeJS. The path module provides a way of working with directories and file paths. The syntax for including the Path module is let path = require (‘path’);

--

--

Mark Pustejovsky

Subject matter expert in P&C and electrical testing. Adding full stack development to resume to bring technology to my next employer.