Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Syntax highlighting docs. Thanks @hij1nx

  • Loading branch information...
commit 6aee616300af22b0ebcc0f6a29d9351768198ee6 1 parent 6a78fdc
Mariano Iglesias authored
Showing with 24 additions and 18 deletions.
  1. +24 −18 README.md
42 README.md
View
@@ -11,33 +11,39 @@ In order for the installation script to locate them properly, you'll
need to set the OCI_INCLUDE_DIR and OCI_LIB_DIR environment variables.
For example:
- $ export OCI_INCLUDE_DIR=/opt/instantclient/sdk/include/
- $ export OCI_LIB_DIR=/opt/instantclient
+```bash
+$ export OCI_INCLUDE_DIR=/opt/instantclient/sdk/include/
+$ export OCI_LIB_DIR=/opt/instantclient
+```
Once the environment variables are set, install with npm:
- $ npm install db-oracle
+```bash
+$ npm install db-oracle
+```
## QUICK START ##
- var oracle = require('db-oracle');
- new oracle.Database({
- hostname: 'localhost',
- user: 'root',
- password: 'password',
- database: 'node'
- }).connect(function(error) {
+```javascript
+var oracle = require('db-oracle');
+new oracle.Database({
+ hostname: 'localhost',
+ user: 'root',
+ password: 'password',
+ database: 'node'
+}).connect(function(error) {
+ if (error) {
+ return console.log("CONNECTION ERROR: " + error);
+ }
+
+ this.query().select('*').from('users').execute(function(error, rows) {
if (error) {
- return console.log("CONNECTION ERROR: " + error);
+ return console.log('ERROR: ' + error);
}
-
- this.query().select('*').from('users').execute(function(error, rows) {
- if (error) {
- return console.log('ERROR: ' + error);
- }
- console.log(rows.length + ' ROWS');
- });
+ console.log(rows.length + ' ROWS');
});
+});
+```
## LICENSE ##
Please sign in to comment.
Something went wrong with that request. Please try again.