Permalink
Browse files

Syntax highlighting docs. Thanks @hij1nx

  • Loading branch information...
1 parent 6a78fdc commit 6aee616300af22b0ebcc0f6a29d9351768198ee6 @mariano committed Jun 3, 2011
Showing with 24 additions and 18 deletions.
  1. +24 −18 README.md
View
42 README.md
@@ -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 ##

0 comments on commit 6aee616

Please sign in to comment.