You’ve downloaded DinoDate, the premier dating website for dinosaurs. Now lets get it up and running!
Prerequisites
- Download Logger and extract it to dino-date/coreDatabase
- Check Logger’s create_user.sql file. If you see an exit statement at the very end , remove it.
- Install Bower.
- Install Oracle Instant Client with the sdk modules.
Installation
Database Schemas and Objects
IMPORTANT – Please make sure you’re using a database instance in which you can safely create schemas named DD, DD_NON_EBR and DD_LOGGER.
- Navigate to dino-date/coreDatabase
- Run dd_master_install.sql from an account connected “as sysdba”.
- First prompt is for the directory into which you extracted Logger, e.g. Logger_3.1.1
- Second prompt is what you want to name the schema that holds the Logger database objects.
- Third and fourth prompts are for your Tablespace and Temporary Tablespace.
- Fourth prompt is for the logger schema password
Common Client
Open a prompt and navigate to dino-date/commonClient
1 |
bower install |
RESTful Tier
Currently there are RESTful APIs written in both NodeJS and Python. You can choose to run one or both.
NodeJS
Open a prompt and navigate to dino-date/nodejs
1 |
npm install |
Python
Open a prompt and navigate to dino-date/python
1 2 |
pip install cx_Oracle pip install bottle |
Configure your Environment
DinoDate uses environment variables for database connection and port settings.
Create the following environment variables using the correct values for your system.
- dd_connectString=localhost:1521/orcl
- dd_user=dd
- dd_password=dd
- dd_port=8888
- dd_python_port=8080
- dd_node_port=3000
Run DinoDate
NodeJS
Open a prompt and navigate to dino-date/nodejs
1 |
node server.js |
DinoDate (NodeJS) will be listening on the dd_node_port port you defined above.
1 |
http://localhost:3000/#/ |
Python
Open a prompt and navigate to dino-date/python
1 |
python3 app.py |
DinoDate (Python) will be listening on the dd_python_port port you defined above.
1 |
http://localhost:8080/#/ |
Running Both
You can run both versions at the same time, provided you specified different ports.
This will allow you to switch between languages by changing the ports and view the code examples specifically for each language.
Please leave a comment if you run into trouble.
For current Node.js versions (6, 8, 10, 11) node-oracledb version 3.1 must be used. For that in the file “nodejs/package.json” the line
“oracledb”: “^0.7.0”
should be changed to
“oracledb”: “^3.1.2”
Otherwise “npm install” issues the warning “npm WARN deprecated oracledb@0.7.0: Update to node-oracledb 3” and then floods the screen with error messages.
Thank you for the updated information.
I downloaded dino-date.zip from OTN (http://www.oracle.com/technetwork/indexes/samplecode/scripting-database-2977640.html) instead of from GitHub. The download in OTN should either be updated or deleted, so that others don’t accidentally download the version from 2016.
Thanks for catching that. I have updated the link to point to the GitHub repo.