The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

First API with Node.js, Express and MongoDB

First API with Node.js, Express and MongoDB

6:44
Learn how to import data into your MongoDB and then use Express to serve a simple Node.js API.
Watch this lesson now
Avatar
egghead.io

Learn how to import data into your MongoDB and then use Express to serve a simple Node.js API.

Avatar
david

That was awesome, thanks so much!

In reply to egghead.io
Avatar
Nir

I waited for it, thank you :)

In reply to egghead.io
Avatar
Bharat

Please continue this series and keep drilling down in more depth as you have done with your previous videos. The MEAN stack (Mongo Express Angular Node) is fascinating as a Rails programmer. I am thinking very seriously of converting my product to the MEAN stack. The more I learn about it, better positioned I am to approach this conversion process.

In reply to egghead.io
Avatar
Ivan

That was great! Thank you for this video!

In reply to egghead.io
Avatar
Jon

Where can I get the sample user data you used here? I'd like to try this myself.

In reply to egghead.io
Avatar
Alex

Jon,

Here you go!
http://www.json-generator.com/j/cajvetyvfS?indent=4

Or, if you prefer, here is how you can whip up a fresh batch of random test data records:

(1) Go to: http://www.json-generator.com/

(2) Run this code:

[
    '{{repeat(1500, 1500)}}',
    {
        id: '{{index()}}',
        guid: '{{guid()}}',
        isActive: '{{bool()}}',
        firstName: '{{firstName()}}',
        lastName: '{{surname()}}',
        email: '{{email([true])}}'
    }
]

-Alex

In reply to Jon
Avatar
Jon

Awesome site, Thanks Alex

In reply to Alex
Avatar
Stephen

Very clear and simple explanation. Could it be possible for you to explain how you hooked up your angular controller to the server.js to get the returned resources? I diddnt see any angular bootstrapping in your HTML code.

Avatar
roger

are there any videos that proceed this one?

In reply to egghead.io
Avatar
Chris

the JSON Generator website is a great tool to play with mock data and get a feel of working with mongoDB. This is how tutorials are meant to be seamless and simplistic, large area for error to happen with little cut backs

Avatar
amit

if possible please add DATE also in both view of video lists. this will help to understand sequence.

Avatar
jack

Thank for this great sample !
How do you get the auto-completing in terminal ?
Is a webstorm's plugin ?
Thanks a lot

Jack

Avatar
Philip

Nice tutorial, but I think it falls a little short with displaying the data onto the page.

Avatar
Matt

+1 I've been wondering about this too...

In reply to jack
Avatar
Joe Wu

If you want to test the remove function, you will need to pass in an empty object {}.

db.people.remove({})

Avatar

[ { firstName: 'Jeorge', lastName: 'Washington', email: 'aaa@bb.cc'}, { firstName: 'Corinde', lastName: 'Van Gohu', email: 'wiers@lap.com'}]

In reply to Jon
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?