You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Can node-oracledb be used in Mobile Hub Custom APIs?

edited Jun 10, 2019 8:18PM in Digital Assistant & Mobile 4 comments

Content

From within my Mobile Hub Custom APIs I need to be able to directly access an Oracle DB instance using Basic authentication. As per the Oracle Mobile Platform videos on youtube, I added the oracledb package as a dependency:

{

  "name": "patients",

  "version": "1.0.0",

  "description": "API to handle getting, adding, and updating of patient records.",

  "main": "patients.js",

  "dependencies": {

    "oracledb": "3.1.2"

  },

  "oracleMobile": {

    "dependencies": {

      "apis": {},

      "connectors": {}

    }

  }

}

 

I then executed "npm install" within the package folder, and it completed without error, and generated a package-lock.json file:

 

{

  "name": "patients",

  "version": "1.0.0",

  "lockfileVersion": 1,

  "requires": true,

  "dependencies": {

    "oracledb": {

      "version": "3.1.2",

      "resolved": "https://registry.npmjs.org/oracledb/-/oracledb-3.1.2.tgz

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!