Showing
3 changed files
with
3 additions
and
3 deletions
... | @@ -16,7 +16,7 @@ MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { | ... | @@ -16,7 +16,7 @@ MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { |
16 | MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { | 16 | MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { |
17 | if (err) throw err; | 17 | if (err) throw err; |
18 | var dbo = db.db("jokeapi"); | 18 | var dbo = db.db("jokeapi"); |
19 | - dbo.createCollection("joke", function(err, res) { | 19 | + dbo.createCollection("jokes", function(err, res) { |
20 | if (err) throw err; | 20 | if (err) throw err; |
21 | console.log("Collection created!"); | 21 | console.log("Collection created!"); |
22 | db.close(); | 22 | db.close(); | ... | ... |
... | @@ -16,7 +16,7 @@ MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { | ... | @@ -16,7 +16,7 @@ MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { |
16 | MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { | 16 | MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { |
17 | if (err) throw err; | 17 | if (err) throw err; |
18 | var dbo = db.db("FunnyStoryapi"); | 18 | var dbo = db.db("FunnyStoryapi"); |
19 | - dbo.createCollection("FunnyStories", function(err, res) { | 19 | + dbo.createCollection("FunnyStory", function(err, res) { |
20 | if (err) throw err; | 20 | if (err) throw err; |
21 | console.log("Collection created!"); | 21 | console.log("Collection created!"); |
22 | db.close(); | 22 | db.close(); | ... | ... |
... | @@ -15,7 +15,7 @@ MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { | ... | @@ -15,7 +15,7 @@ MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { |
15 | //Create collection | 15 | //Create collection |
16 | MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { | 16 | MongoClient.connect(url, { useNewUrlParser: true }, function(err, db) { |
17 | if (err) throw err; | 17 | if (err) throw err; |
18 | - var dbo = db.db("redditjoke"); | 18 | + var dbo = db.db("reddit"); |
19 | dbo.createCollection("redditjokes", function(err, res) { | 19 | dbo.createCollection("redditjokes", function(err, res) { |
20 | if (err) throw err; | 20 | if (err) throw err; |
21 | console.log("Collection created!"); | 21 | console.log("Collection created!"); | ... | ... |
-
Please register or login to post a comment