Create a CRUD App with Node and MongoDB

Showing Real Events

We'll use mongoose and the mongoose model we created to grab real events from our MongoDB database.

To grab events:

// grab all events, the {} matches all
Event.find({}, (err, events) => {



// grab a single event with the slug ping-pong
Event.findOne({ slug: 'ping-pong' }, (err, event) => {



Like this article? Follow @chrisoncode on Twitter