I previously thought Node was a ‘framework’, but learned today that it differs in that most frameworks actually contain their own runtime environs, and also have their own internal libraries.
A notable aspect of Node is that it allows you to work with AND run your code completely outside of the browser — a significant shift from a front-end approach, which almost exclusively focuses on browser presentation and display.
In addition to brushing up on some new terminology and getting basic instruction on how to install and run Node, we jumped into a few programming exercises to practice running our code and working through error message syntax via the terminal. We were also introduced to the world of npm (Node Package Manager), which allows you to download “packages” of other people’s code to incorporate into your own programs.
As you can see from the code above, the ‘chalk’ npm enables color change assignments to text in the terminal through very brief code additions, while ‘moment’ allows you to track and evaluate varieties of information related to time — including time zones, daylight savings considerations, duration of time broken down into a variety of increments, etc.
I definitely see how npms are extremely useful resources to have on hand, as they allow you to incorporate a bunch of cool functions and features into your program without implementing a ton of extra code. Excited to continue playing around here for a bit and seeing what else I can find…
Song of the Day: “Never Been Wrong” by Waxahatchee