mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
parent
b4bfd63f63
commit
0ee010e5a0
@ -41,7 +41,7 @@ That's it. But now everywhere else in my application instead of requiring `pg` d
|
||||
```js
|
||||
// notice here I'm requiring my database adapter file
|
||||
// and not requiring node-postgres directly
|
||||
import * as db from '../db.js'
|
||||
import * as db from '../db/index.js'
|
||||
|
||||
app.get('/:id', async (req, res, next) => {
|
||||
const result = await db.query('SELECT * FROM users WHERE id = $1', [req.params.id])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user