DDBC is a Node.js application which acts as an interface to query an Oracle database via HTTP requests.
Download and install SFX from http://dmytro.malikov.us/ddbc/ OR follow procedure:
- mkdir "C:/Program Files/DDBC"
- cd "C:/Program Files/DDBC"
- git clone https://github.com/dmytro120/ddbc.git
- npm install oracledb
- Get Oracle "Instant Client Package - Basic" and put it at "C:/Program Files/DDBC/oci".
Setup is mandatory regardless of whether you installed from SFX or followed manual procedure.
- mkdir %LOCALAPPDATA%/DDBC
- mkdir %LOCALAPPDATA%/DDBC/Network/Admin and put all your *.ORA files here.
- Create dbconfig.js in %LOCALAPPDATA%/DDBC/ and define settings per example below:
module.exports = {
user : process.env.NODE_ORACLEDB_USER || "dbuser",
// Instead of hard coding the password, consider prompting for it,
// passing it in an environment variable via process.env, or using
// External Authentication.
password : process.env.NODE_ORACLEDB_PASSWORD || "dbpassword",
// For information on connection strings see:
// https://github.com/oracle/node-oracledb/blob/master/doc/api.md#connectionstrings
connectString : process.env.NODE_ORACLEDB_CONNECTIONSTRING || "XE",
// Setting externalAuth is optional. It defaults to false. See:
// https://github.com/oracle/node-oracledb/blob/master/doc/api.md#extauth
externalAuth : process.env.NODE_ORACLEDB_EXTERNALAUTH ? true : false
};
DDBC was created in a locked-down corporate environment in order to allow using a SPA (single page application) as an alternative front end to a database whose primary front end is a legacy Cincom SmallTalk application which has numerous quirks and limits potential expandability.
Please note that there are numerous potential security issues if DDBC is used in a non-locked down environment. In most applications, direct access to a database by sending queries via HTTP requests is a bad idea. Use at your own risk.