From bad1d00e9415ac2d941f6197b1690dba2da248be Mon Sep 17 00:00:00 2001 From: Alessandro Bertacco Date: Sun, 6 Nov 2016 10:36:57 +0100 Subject: [PATCH] Update Readme.md The first example doesn't mention that the connection must be opened before passing it to Grid. --- Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Readme.md b/Readme.md index 2bdf141..165e3c9 100644 --- a/Readme.md +++ b/Readme.md @@ -14,6 +14,7 @@ var Grid = require('gridfs-stream'); // create or use an existing mongodb-native db instance var db = new mongo.Db('yourDatabaseName', new mongo.Server("127.0.0.1", 27017)); +// make sure the db instance is open before passing into `Grid` var gfs = Grid(db, mongo); // streaming to gridfs