Use Oracle Database with Spree

In order to connect your Node.js application to an Oracle Database, you need to install the following packages.

libaio

Oracle Instant Client (and SDK)

oracledb Node.js module

Step 1: Install libaio

Execute the following command:

$ sudo apt-get install libaio1

Step 2: Install Oracle Instant Client and Oracle Instant Client SDK

Download both instantclient-basic-linux.x64.zip and instantclient-sdk-linux.x64.zip. The version will depend on the Oracle Database you have running. For instance, for Oracle Database 12c you would download instantclient-basic-linux.x64-12.1.0.2.0.zip and instantclient-sdk-linux.x64-12.1.0.2.0.zip (we will use them in the rest of the examples).

Uncompress instantclient-basic-linux.x64.zip by executing the following command:

In the same folder where connect.js was downloaded, create the file dbconfig.js with the following contents (remembering to replace the DATABASE_USER, DATABASE_PASSWORD and DATABASE_CONNECTION_STRING placeholders with the correct values):