This directory contains node-oracledb 3.1 examples.
The node-oracledb add-on for Node.js powers high performance Oracle Database applications.
Issues and questions about node-oracledb can be posted on GitHub or Slack (link to join Slack.
To run the examples:
-
Use
demo.sqlto create schema objects used by the samples. For example, to load them in the HR schema run:sqlplus hr SQL> @demo.sql -
Edit
dbconfig.jsand set your username and the database connection string:module.exports = { user: "hr", password: process.env.NODE_ORACLEDB_PASSWORD, connectString:"localhost/orclpdb" }; -
Set the environment variable
NODE_ORACLEDB_PASSWORDto your database schema password.On Windows:
set NODE_ORACLEDB_PASSWORD=...On Linux:
export NODE_ORACLEDB_PASSWORD=... -
Then run the samples like:
node select1.js
The demonstration objects can be dropped with demodrop.sql:
sqlplus hr/welcome@localhost/orclpdb @demodrop.sql