Applying CRUD operations with the low-level mongodb driver

Again, I won't cover installation of the server software. Please refer to the official installation instructions(h t t p s ://d o c s . m o n g o d b . c o m /m a n u a l /i n s t a l l a t i o n /) in order to get a MongoDB server up and running on your machine.

If you have Docker installed on your machine, the quickest way to get a MongoDB server up and running is this one-liner:

docker run --rm --name mongo -p 27017:27017 -d mongo:3.4  

See h t t p s ://h u b . d o c k e r . c o m /_ /m o n g o / for more details.

Once this is done, create a new project folder called mongodb-test, and in there create an initial package.json as follows:

 { "name": "mongodb-test", "version": "0.0.1", ...

Get The Node Craftsman Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.