mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
readme code formatting
This commit is contained in:
parent
7729b2d493
commit
8bb278519a
30
README.md
30
README.md
@ -13,9 +13,9 @@ only refactoring after tests are in place.
|
||||
Clone the repo. There are __no__ dependencies.
|
||||
|
||||
```bash
|
||||
git clone git://github.com/brianc/node-postgres
|
||||
cd node-postgres
|
||||
node test/run.js
|
||||
git clone git://github.com/brianc/node-postgres
|
||||
cd node-postgres
|
||||
node test/run.js
|
||||
```
|
||||
And just like magic, you're ready to contribute! <3
|
||||
|
||||
@ -136,21 +136,21 @@ tests for more up to date examples, but what I'm working towards is
|
||||
something like this:
|
||||
|
||||
```javascript
|
||||
var client = new Client({
|
||||
user: 'brian',
|
||||
database: 'test'
|
||||
});
|
||||
var client = new Client({
|
||||
user: 'brian',
|
||||
database: 'test'
|
||||
});
|
||||
|
||||
var query = client.query({
|
||||
text: 'select * from person where age < $1',
|
||||
values: [21]
|
||||
});
|
||||
var query = client.query({
|
||||
text: 'select * from person where age < $1',
|
||||
values: [21]
|
||||
});
|
||||
|
||||
query.on('row', function(row) {
|
||||
console.log(row);
|
||||
});
|
||||
query.on('row', function(row) {
|
||||
console.log(row);
|
||||
});
|
||||
|
||||
query.on('end', function() { client.end() });
|
||||
query.on('end', function() { client.end() });
|
||||
```
|
||||
## Testing
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user