Projects in Node.js

Mark Pustejovsky
2 min readOct 13, 2020

I am continuing my journey learning Full Stack Development @AustinCodingAcademy.

This week I worked with google maps for the first time. I was able to get an API key and implement a google map in a project I am building. I was exciting to be able to make a project with an interactive map that I could put in my own points dynamically based on user inputs.

One very important thing when creating apps is to ensure adequate testing is done before you release them for use. Have a good testing strategy is important and should be part of the development process. We have been taught to use testing libraries in in Node.js and outlining the testing as the starting point for our code. Good tests are key and think of edge cases that might come up is crucial. Also testing your app on different web platforms is very important. Such as Chrome, Explorer, and Mozilla.

Testing is important to find programming errors but you must also test your application for performance. You want to make sure your program can handle the expect traffic. There are many performance testing tools available, like LoadNinja or WebLoad. These types of tools can ensure your app is working efficiently.

When working with API’s you must handle errors when you try to connect to an interface. The perform method of resolving exceptions is Node.js is called a try and catch block. Here is the lines of code typically used:

try {

//your code…

} catch(err){

console.log(err)}

Another way to resolve unhandled exceptions is process. Process is a global object that provides information about the current Node.js process.

A question we were asked was: How does Node.js support multi-processor platforms, and does it fully utilize all processor resources? Since Node. js is by default a single thread application, it will run on a single processor core and will not take full advantage of multiple core resources. However, Node.js provides support for deployment on multiple-core systems, to take greater advantage of the hardware. The Cluster module is one of the core Node.js modules and it allows running multiple node.js worker processes that will share the same port.

Another questions asked this week was: What is typically the first argument passed to a Node.js callback handler? Traditionally, the first parameter of the callback is the error value. If the function hits an error, then they typically call the callback with the first parameter being an Error object. If it cleanly exits, then they will call the callback with the first parameter being null and the rest being the return value(s).

I have two classes left for JS311. Till next week, be safe.

--

--

Mark Pustejovsky

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