mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Updated Home (markdown)
parent
300bcc387a
commit
1821843a6b
4
Home.md
4
Home.md
@ -26,9 +26,9 @@ var Pool = require('pg').Pool
|
||||
var pool = new Pool()
|
||||
|
||||
http.createServer(function(req, res) {
|
||||
pool.query('SELECT $1::text as name', ['brianc'], function(err, res) {
|
||||
pool.query('SELECT $1::text as name', ['brianc'], function(err, result) {
|
||||
res.writeHead({'content-type': 'text/html'})
|
||||
res.end('Hello from: ' + res.rows[0].name)
|
||||
res.end('Hello from: ' + result.rows[0].name)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user