2
acelan
6y

NodeJS and MongoDB. And tutorials.

Everywhere tutorials show simple example of console.log output of findOne. Good, that works... But when I try to extrapolate example to assign results to variable, it won't work. Inside that fetch anonymous function it works... But outside, simply undefined no matter what I try. Return doesn't return either...

Why it is so hard to make tutorials and examples that would be actually useful. I've spent hours with this already.

And on top of that it is really hard to find tutorials staying with minimum extra dependencies. Like most tutorials in this case throw mongoose in the soup. And I don't want that.

Sometimes makes me question why I try to learn these new things, when I have knowledge of other technologies that I could use faster and easier...

Comments
  • 0
    Have you looked into callbacks, promises and asynchrony in js? I'd strongly advise you to get into that first before diving into libraries using async functions
  • 0
    dev life is hard, can't deny that

    if you keep grinding though, it will get easier eventually...
  • 0
    Take a look at udemy.com there are pretty good courses about this topics.

    Or use mongoose to make your life easier as first step.
Add Comment