Lesson 20 · Node.js on IBM i — From RPG Developer to Modern IBM i Developer
Complete the Tools Rental Project
Review the finished application, verify every layer, and identify sensible next improvements without losing the working baseline.
The project began with one JavaScript object representing a cordless drill. It now has a database, business transactions, an API, tests, a browser interface, and a production operating plan.
That progression is the point of the course. Node.js is not useful because it can print Hello World. It is useful because it can provide a maintainable modern interface while Db2 for i and established IBM i practices continue to protect the business data.
What you built
The completed application includes:
Browser interface
↓
Fastify routes and validation
↓
Node.js database module
↓
Db2 procedures, constraints, and tables
↓
IBM i authority, jobs, storage, and operations
It can:
- List available tools
- List active customers
- Rent an available tool to an active customer
- Prevent a second rental of the same tool
- List open and overdue rentals
- Record a return and make the tool available again
- Reject invalid requests with useful responses
- Run route tests without changing production data
- Report whether the process and its database dependency are healthy
Verify the repository
A finished repository should have a recognizable shape:
tool-rental/
├── public/
│ ├── app.js
│ ├── index.html
│ └── styles.css
├── sql/
│ ├── README.md
│ ├── 001-create-tables.sql
│ ├── 002-seed-development-data.sql
│ └── 003-rental-procedures.sql
├── src/
│ ├── db.js
│ └── server.js
├── test/
│ └── server.test.js
├── .env.example
├── .gitignore
├── package.json
└── package-lock.json
Your exact structure may differ, but another developer should be able to find the source, database changes, tests, configuration definition, and operating instructions without guessing.
Run the final checklist
Before calling version 1 complete:
npm cisucceeds from a clean checkout on IBM i.npm testpasses.- The SQL scripts work in a new test schema.
- Rent and return remain consistent when requests fail.
- The runtime profile has only required authority.
- Authentication and TLS are provided by an approved design.
- Secrets are absent from Git and logs.
- Health checks reflect both Node.js and Db2 readiness.
- Operators can start, stop, inspect, and recover the service.
- The deployed release can be traced to a Git commit.
- A tested rollback procedure exists.
If one of these items is missing, record it as work rather than quietly accepting it as a production assumption.
Sensible next improvements
Build on the working baseline one feature at a time:
- Reservations for a future date
- Maintenance and out-of-service status
- Multiple rental locations
- Pricing rules and invoices
- Audit history showing who performed each action
- Pagination and search for a larger inventory
- Integration with existing RPG procedures
- CI/CD promotion through development, test, and production
- Operational metrics and alerting
Each improvement should begin with a business requirement, a data decision, and a test. Avoid adding a framework or package simply because it is popular.
The larger lesson
You did not replace RPG, move Db2, or abandon IBM i. You added a modern application layer using the same habits that make traditional IBM i systems dependable: explicit data rules, controlled authority, repeatable deployment, traceable source, and operational ownership.
That is a practical modernization path—small enough to begin, but complete enough to operate.
The application is complete at this point. The next lesson is an optional extension that keeps the same project and replaces only its Db2 connector with Mapepire.
References
Documentation and references used for this lesson.

Comments
Share your thoughts, questions, or real-world IBM i experiences related to this article.