Cycling ‘74 has some very useful GitHub repositories with many examples on how to use Node for Max. The core examples repo in particular is a great way to get started.
For the purposes of this workshop, we’ve condensed a handful of examples useful for basic communication and message handling into a single Max patch and a pair of Node scripts. Navigate to the “node4max-intro” folder in the workshop repo and open the “node4max-intro.maxpat” patch. Explore the “node4max-intro-handler.js” and “node4max-intro-types.js” scripts.