From 0ae9dfcef07fb5b0d1299796de73bb786b0a7356 Mon Sep 17 00:00:00 2001 From: Michael Zaghi Date: Mon, 10 Oct 2022 18:25:37 -0600 Subject: [PATCH] Fixing small typo in connecting with express documentation. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2f66089..2a763c61 100644 --- a/README.md +++ b/README.md @@ -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')