Skip to content

Files

Latest commit

May 11, 2023
1a850db · May 11, 2023

History

History

reactive-mongodb-tailable-cursor

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 10, 2023
May 10, 2023
May 10, 2023
May 10, 2023
May 10, 2023
May 10, 2023
May 10, 2023
May 10, 2023
May 10, 2023
May 11, 2023

Creating Capped Collection:

Enter into the mongo container

docker exec -it mongo bash

Access mongo shell for the ‘admin’ database.

mongosh admin --username admin --password password

Create a capped collection called movie. Here the size is max number of bytes for the collection documents which is a mandatory field. Max is 50 documents – it is optional.

db.createCollection("movie", { capped : true, size : 5242880, max : 50 } )

Once you start and launch the app

{
    "title":"Code Name: K.O.Z.",
    "year":2015,
    "genre":"action",
    "imdbRating":1.6
  }
Screenshot 2023-05-10 at 11 25 20 PM
Screenshot 2023-05-10 at 11 25 31 PM