Building Native Node.js 12 Addons on z/OS

Petr Plavjaník
5 min readJul 20, 2020

Here I will show how you can build a native C++ addon for Node.js on z/OS.

It takes a little effort but it can be done! IBM has ported Node.js to z/OS so you can run Node.js server applications on z/OS. You can download it from the IBM website: IBM SDK for Node.js — z/OS — Overview.

You can install the base Node.js to z/OS by following instructions in this story:

In this story, you will see how to install the provided C/C++ compiler so you will be able to build native extensions with node-gyp.

When do you need to write a native addon for Node.js on z/OS? There are two main reasons. The first one is to optimize the performance-sensitive code such as CPU intensive calculations. Second, is to interoperate with a native mainframe application that you have on z/OS.

Photo by Dane Deaner on Unsplash

Prerequisites

You need to have all the prerequisites listed at https://www.ibm.com/support/knowledgecenter/SSTRRS_12.0.0/com.ibm.nodejs.zos.v12.doc/paxz.htm:

--

--

Petr Plavjaník

Petr’s main areas of expertise are mainframes and automation, and using modern development tools and languages such as Java, Python, and Node.js on z/OS.