Skip to content

Commit

Permalink
Merge pull request #1433 from MikeZ77/master
Browse files Browse the repository at this point in the history
Fixing small typo in connecting with express documentation.
  • Loading branch information
dhensby committed Oct 12, 2022
2 parents c40b64a + 0ae9dfc commit 655f439
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 655f439

Please sign in to comment.