Closed stevenchu03 closed 3 years ago
Hey! A preview of the changes is deployed on netlify to take a look at! :)
Built with commit 26f2e07cea97992a150f50cfe91c0715b2b59146
https://deploy-preview-122--hopeful-clarke-f36d36.netlify.app
No, that’s an expression-bodied arrow function. It’s already correct, and this change would make it a syntax error.
Sorry, I didn't notice it. Thanks for clarify 🙏
should be like in this page
https://node-postgres.com/guides/project-structure
There is, would make also short syntax
module.exports = {
query: (text, params, callback) => pool.query(text, params, callback),
}
should be like in this page
https://node-postgres.com/guides/project-structure
There is, would make also short syntax
module.exports = { query: (text, params, callback) => pool.query(text, params, callback), }
Hi Igolskyi, thanks for your explanation. Last night, I learned express js with PG. and I didn't notice. I code like this:
module.exports = {
query: (text, params) => {return pool.query(text,params)}
}
I will be more careful to open PR 🙏
this code missing
return
should be like in this pagehttps://node-postgres.com/guides/project-structure