Skip to content

Repository files navigation

DB Facade Service

Production-ready HTTP gateway for IBM i (AS/400) DB2 database using node-jt400.


Features

  • Robust connection pooling with automatic pretest validation
  • Prevents "dead on arrival" connections
  • Query, Update, and full Transaction support
  • Multi-environment configuration via dotenv
  • PM2 ready (single process / fork mode)
  • Proper Windows support with JAVA_HOME validation
  • Health check endpoint

Project Structure

db-facade-service/
├── .env
├── .env.development
├── .env.production
├── .env.example
├── ecosystem.config.js
├── package.json
├── scripts/
│   └── setup-jvm.js
├── src/
│   ├── config/
│   │   └── index.js
│   ├── db/
│   │   ├── pool.js
│   │   └── index.js
│   ├── middleware/
│   │   └── errorHandler.js
│   ├── routes/
│   │   └── db.js
│   └── server.js
└── README.md

Prerequisites

Windows Only:

  • Install JDK 8 (recommended) or JDK 11 (64-bit)
  • Set environment variable JAVA_HOME to the JDK folder
  • Add %JAVA_HOME%\bin to your PATH

Linux / macOS: No extra Java setup needed.

Installation

npm install

# Important: Rebuild Java bridge (especially on Windows)
npm run rebuild

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages