So what is Express?
Express is a small, fast web framework for Node.js. It gives you:
- Routing - map
GET /ingredientsto a function. - Middleware - plug-in functions that run on every request (JSON parsing, logging, authentication, error handling).
- Static files - serve HTML, CSS and JavaScript to the browser.
It's been around since 2010, it's what most Node tutorials use, and it's the jet engine (see what I did there?) of our ingredients app.
And itoolkit?
itoolkit is IBM's npm package for calling IBM i things - CL commands, programs, service programs, shell commands - via XMLSERVICE (which ships with IBM i in library QXMLSERV). It's how Node.js reaches your existing RPG.
Install both
mkdir -p ~/express-demo && cd ~/express-demo
npm init -y
npm install express odbc itoolkit xml2js
npm init -y
npm install express odbc itoolkit xml2js
