From 76caa12aa7df4fa8f9001de428a4cfc54ce17daa Mon Sep 17 00:00:00 2001 From: Avindra Goolcharan Date: Wed, 11 Dec 2019 13:12:52 -0500 Subject: [PATCH] invoke async function as IIFE in example The example as listed currently does not run anything, so wrapping it up as an async IIFE. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 45e3dbbc..e91002ff 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Supported TDS drivers: ```javascript const sql = require('mssql') -async () => { +(async () => { try { // make sure that any items are correctly URL encoded in the connection string await sql.connect('mssql://username:password@localhost/database') @@ -26,7 +26,7 @@ async () => { } catch (err) { // ... error checks } -} +})(); ``` If you're on Windows Azure, add `?encrypt=true` to your connection string. See [docs](#configuration) to learn more.