Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Syntax highlighting docs

  • Loading branch information...
commit c49d9dc2ad65ca6d9a8c0f140f2ff69dae64758a 1 parent 64eebed
@mariano authored
Showing with 20 additions and 16 deletions.
  1. +20 −16 README.md
View
36 README.md
@@ -5,28 +5,32 @@ database bindings visit the [Node.js DB homepage] [homepage].
## INSTALL ##
- $ npm install db-drizzle
+```bash
+$ npm install db-drizzle
+```
## QUICK START ##
- var drizzle = require('db-drizzle');
- new drizzle.Database({
- hostname: 'localhost',
- user: 'root',
- password: 'password',
- database: 'node'
- }).connect(function(error) {
+```javascript
+var drizzle = require('db-drizzle');
+new drizzle.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.