Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ctgbarcalow/node-mssql
Browse files Browse the repository at this point in the history
  • Loading branch information
ctgbarcalow committed Oct 13, 2022
2 parents b4f424d + a342cc9 commit 4f31cc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ Then the route uses the connection pool in the `app.locals` object:
const sql = require('mssql');

module.exports = function(req, res) {
req.locals.db.query('SELECT TOP 10 * FROM table_name', function(err, recordset) {
req.app.locals.db.query('SELECT TOP 10 * FROM table_name', function(err, recordset) {
if (err) {
console.error(err)
res.status(500).send('SERVER ERROR')
Expand Down

0 comments on commit 4f31cc6

Please sign in to comment.