Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
Can node-oracledb be used in Mobile Hub Custom APIs? — Cloud Customer Connect
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?

Received Response
18
Views
4
Comments
edited Jun 10, 2019 8:18PM in Digital Assistant and 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!