Menu

Node.js on IBM i

From RPG developer to modern IBM i developer.

Begin with small programs that make Node.js and the IBM i environment familiar. Then use those skills to build and deploy one complete tools rental application.

Part 1

Get comfortable with Node.js on IBM i

Start with the environment, a Hello World program, npm, and a safe first Db2 query.

Part 2

Build the Tools Rental application

Carry one practical IBM i application from its first source file through testing and a browser interface.

Lesson 83 min read

Start the Tools Rental Project

Create the Node.js project we will use for the rest of the course, run its first small program, and put the source under Git control.

IBM iNode.jsGitnpmTools Rental
Lesson 93 min read

Design the Tools Rental Data Model

Turn the tools-rental idea into three small Db2 for i tables and define the business rules before writing SQL.

IBM iNode.jsDb2 for iData ModelingTools Rental
Lesson 102 min read

Create the Tools Rental Tables in Db2 for i

Create the TOOLRENT schema, add keys and constraints, load a small data set, and keep every SQL change in Git.

IBM iDb2 for iSQLDDLTools Rental
Lesson 113 min read

Build a Small Db2 Data-Access Module

Move Db2 code into one module, list available tools, and retrieve one tool safely with a parameterized query.

IBM iNode.jsDb2 for iJavaScriptSQL
Lesson 122 min read

Create the Tools Rental API

Add Fastify, expose health and tools endpoints, and run the first HTTP service from IBM i.

IBM iNode.jsFastifyREST APIHTTP
Lesson 133 min read

Rent a Tool Safely

Protect the rental rules in Db2, call the transaction from Node.js, and add the first write endpoint to the API.

IBM iNode.jsDb2 for iTransactionsREST API
Lesson 141 min read

Return a Tool and List Open Rentals

Complete the rental workflow by recording returns, making tools available again, and listing current and overdue rentals.

IBM iNode.jsDb2 for iSQLREST API
Lesson 152 min read

Validate Requests and Return Useful Errors

Give callers predictable 400, 404, 409, and 500 responses without leaking database details.

IBM iNode.jsFastifyValidationError Handling
Lesson 162 min read

Test the Tools Rental API

Use Node.js's built-in test runner and Fastify injection to verify routes without opening a network port or changing Db2 data.

IBM iNode.jsTestingFastifynode:test
Lesson 173 min read

Add a Simple Browser Interface

Serve a small rental-counter screen from the Node.js application and connect it to the tools, customers, rentals, and returns APIs.

IBM iNode.jsHTMLJavaScriptUser Interface

Part 3

Secure, deploy, and operate the application

Prepare the project for IBM i production, keep the deployed source traceable, and finish with a supportable operating model.

Part 4

Explore another Db2 connection path

Keep the completed application intact while learning where an alternative connector can fit.