Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "mongoose"
I'M A MORON!!!!!!!
I JUST SPENT 4 HOURS DEBUGGING SOME FUNCTIONS IN A NODE BACKEND THAT USES MONGOOSE. THE FUNCTIONS USED MONGODB METHODS!
lesson: while RTFM, read precisely, not just skim read.1
That feeling when you try to get entries from a mongodb and it doesn't put out anything, not even errors and after 4 FUCKING HOURS trying, googling and looking around on stackoverflow, you realize THAT THE PROGRAMM DIDN'T EVEN CONNECT TO THE DATABASE
That's the stupidest problem I ever had IN MY ENTIRE FUCKING LIFE
Thanks devRant, I feel better now.4
So, I was getting started with express middlewares and installed Postman. I saw this. I literally cracked up laughing so hard at this.7
Sometimes I don't know if my co-worker is that stupid or...
Well, he came to me with an strange problem with mongoose.
I looked at the error message. And guess what the database was not reachable. Asked him, did you check the mongo db service. No. Of course the service was not running. Told him to restart it. Then he restarted robo t not the service itself. Major face palm. He then asked me if I knew why his service was not running. Do I look like some kind of wizard? Told him to check the logs. Long story short, his drive ran out of space....2
Two months ago I started working at a new company, who's system is a huge monolith. The company is a bit over one year old, and the code base is huge. The desire to move to more of a microservices architecture is on the radar, but one of the biggest issues in moving towards it is how we should keep our models. The stack is basically Node.js and Mongoose, where there's about a few dozen mongoose models that the whole system uses, and the issue is that, if we moved to a microservices architecture, how could we keep the models in sync. One idea I had was to keep the models in a separate (node) package that would be shared across all microservices, but then there's the issue that if one model needs changes, all microservices that use that model will need to be updated. Another idea we had was to not share models, but instead let every microservice be in charge of everything to do with a certain type of data (eg. Users are only directly accessed by one microservice, companies by another, and no two microservices share responsibility over data), but that might bring problems when one microservice depends on a certain set of data from another microservice. How do you guys manage all that? Any ideas or tips? Thanks ^^19
My boi states that node's biggest issue has always been npm and the quality of packages. I always contradict those statements by saying that if one uses community standards and the best packages then one does not need to worry about the quality(i.e mongoose over some unmaintained mongo wrapper etc)
I sometimes catch myself finding that my way of thinking adapts better to JS than it even does Python (which is his preference for deep learning) and whilst there are some beastly packages for python in terms of quality and usefulness such as matplotlib etc that one can do great things with the equivalent JS.
I mean, tensorflow.js came from the same wizards that did tensorflow (obviously) and i find the functional approach of JS to be more on par with how we develop solutions.
I am no deep learning expert, and sadly I have no professional experience with machine learning. But I venture to say that we should not cast aside the great strides that the JS community has done to the language in terms of evolution and tooling. Today's Js is not your grandaddy's Js and thinking that the language is crippled because of early iterations of the language would be severely biased.
What do you guys(maybe someone with professional experience) think of Js as a language for machine learning?
Do you think the language poses something worth considering in terms of tooling and power for ml?3
I am making my first dashboard/summary page without a tutorial! Once I learn D3 via a Udemy course, this will be 93% done!
I just want want to see what you guys think?
Some text is removed as I shared it on FB and the business I am making it for is following me and they have NO idea that I am doing it for them.5
After 4 - 5 months of learning webD, I am trying to build my first fullstack web application (simple chat one ).
My stack :
Vue.js + Materialize
Express ( handling routes )
Mongoose/MongoDB ( Database )
Socket.io ( web sockets for real time connection )
Had dreamt of this 2 months ago where I built a basic front end using html and css, and now porting it to Vue is like a breeze.
Wish me luck and let's hope it doesnot become one of the unfinished projects. ( My university semester exams are coming up , would have to complete this as fast as possible ). I am also learning DSA + STL and aim to learn basic python syntax before holidays so that I can focus my time on ML during them. It's so fucking overloaded that I have my doubts ::((4
So... We're going to totally rewrite one of our web applications at work. It's currently written using the .NET framework, and we're moving to Node.js instead. For me, that's absolutely wonderful! Outside work I practically only work with Node, so I'm happy. There is just one thing that's bothering me. My colleague wants to use MySQL for the database. Even worse is that he's the one deciding, since I started working there just a couple of weeks ago.
Now, I really, really want to use Mongodb. It integrates so wonderfully with Node together with Mongoose, and just the thought of using JSON everywhere makes my body shiver of satisfaction.
So therefore I have two questions.
A. Would you prefer Mongodb over MySQL for a node application?
B. How the hell can I convince him to use Mongodb?!
Constantly feeling like I don't know enough to land a jr. Web dev position. I know html/css/js, I understand the fundamentals of jQuery, I have an early grasp on node and express, and Ive played around with some mongoose and angular. Still, I feel like I'm a thousand steps beyond landing a job. Im about to graduate college in a year and seriously need the money but I have no idea how I'm going to get there.6
Did mongoose suddenly change how it’s URIs are parsed? It’s suddenly rejecting my mLab MongoDB URIs with various errors 😭2
Just published my first npm package. A Mongoose-like interface for Firebase.
- Continue learning Node.js, Express, MongoDB (I just need to learn mongoose now, then I can start making bigger projects).
- Learn PHP and start making freelance work;
- Continue getting good grades at uni;
- Workout more often (like 4 times per week);
- MAKE MONEY!!!
Edit: Happy 2018!!!
Who is doing this to me *sobs*, mongoose or MongoDB? 😥😥
I'm adding new records (array) to an embedded document, but the first record to be added gets duplicated, even with the same ID and stuff :(..
Was using Callbacks, switched to promises, still the same.
ANYONE USING MONGOOSE HERE?!!
TypeError: User is not a function.
That User is a Schema. I've been searching for so long now and I can't seem to find a way to make this work. Sorry for being desperate that I had to ask on devRant.5
Working with nested arrays in MongoDb!! Who would have thought it would be such a pain to update data in nested arrays in a database! So frustrated!!!!
React app, on mongodb 3.6 and mongoose 5.0.17
Still cant use tje aggregate function without a cursor. Anyhelp ?
How do you implement storage of chat messages server side. Assume the data structure has to fit in MongoDB and work with Mongoose. Every user has a unique ID. Application written in Node.js. Anything else is fair game.3
Changed the nodejs template engine because i though its unable to parse nested object. After the second engine had the same error i checked the properties of the mongoose "populated" object and its mongooses fault.. wasted 4-5 hours of debugging just because of a missleading console.log ... FUCK!1
Mongoose: Callbacks VS Promises? Opinions and reasons please.
I'm trying to update array of data which involves couple queries.. Best practices?9
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...3
So, I have a problem I'm working with mongoose in nodejs and I want to make a dynamic query like I have 2 fields gender and type of room and these are optionals so what I did I wrote an if condition that if gender is not undefined a variable which is q += "gender:" + " ' " + gender + " ' " + ","; and when I pass this variable in find() it doesn't work but if i write the same query directly there in find() it works what seems to be the problem?1