We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b4f424d + a342cc9 commit 4f31cc6Copy full SHA for 4f31cc6
README.md
@@ -437,7 +437,7 @@ Then the route uses the connection pool in the `app.locals` object:
437
const sql = require('mssql');
438
439
module.exports = function(req, res) {
440
- 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) {
441
if (err) {
442
console.error(err)
443
res.status(500).send('SERVER ERROR')
0 commit comments