Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "mongoose"
-
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 applied for a job. People tend *not* to answer my applications, probably because my resume very clearly states I implemented malloc in fasm, among other things.
I imagine them going like "Sir, this is a Wendy's", or rather "we're looking for a 10X rockstar AnalScript ZAZQUACH mongoose-deus puffery quarter-stack developer". Fair enough, I certainly don't fit that bill.
But this time I not only got an answer, the guy went like "I'm impressed". Is this... recognition? From a human? What?
Fellas, I cannot process this emotion. Being frank, it's not even about the job. But willfully going against the idiocy of the industry standard, and then seeing that utterly deranged move actually amounting to something -- no matter how small -- is quite uncanny.
And of fucking course, it's a Perl job. Figures. Great minds think alike.3 -
So, I was getting started with express middlewares and installed Postman. I saw this. I literally cracked up laughing so hard at this.7
-
It is fucking written in rules that SLA would be given post the discussion.
AFTER THE MOTHERFUCKING DISCUSSION.
Bitch can't read a simple English statement.
And in the SLA column, it is clearly mentioned that one must state the DATE. This idiot mentions the entire fucking Quarter.
How fucking dumb you can be to not read the basics mentioned for your own and others ease of functioning.
Indians are illiterate morons. I apologise to the entire world today on behalf of these fragmented cauliflowers.
To whoever this means, I am sorry that you have to deal with these retarded brains.
Also, the task was supposed to be done by others and not the blabbering bitch. She takes up random unwated shit and then cribs to our manager that she is overloaded and Floyd isn't helping.
When I help, she complains that I am overstepping.
Go fuck yourself you mongoose.9 -
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 ^^14
-
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 -
I was talking to a friend about the current state of machine learning through tensorflow and commented about the use of Javascript as a language.
He discarded the idea as he views Javascript as something that should only be used as a frontend technology rather than something to build backends or deep learning models.
I am thorn. I have always liked Javascript but will admit that I have used it mostly in the area of front end with very few backend instances(i did create a full stack intranet app in Express once, major success for the application it was hosting, it was a very basic api which had its own nosql db with no need to interact with the company's relational data, it was perfect for the occasion and still help maintaining it from time to time)
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?2 -
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?!
Cheers!11 -
mongpoop
this is how our upgrade from mongoose v5 to v6 went
v5: strictQuery is false by default
v6: strictQuery is true be default
^ realized this once our update went live, we are now manually migrating several hundreds of production data.
v7: strictQuery is false by default.
what!!!2 -
!rant
After 4 - 5 months of learning webD, I am trying to build my first fullstack web application (simple chat one ).
My stack :
FRONTEND:
Vue.js + Materialize
Backend:
Express ( handling routes )
Mongoose/MongoDB ( Database )
Socket.io ( web sockets for real time connection )
JWT
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 -
My own little version of moore's law:
In 1986 the connectome (the brain) of c. elegans, a small worm, was mapped. It would take decades before the research caught up to the point where we had the hardware to simulate it.
In 2024, we have successfully mapped, and fully simulated (to matching observed behavioral data) the brain of a fruit fly, a total of 139,255 neurons and corresponding connections.
Thats a 38 year period.
If the period is roughly 40 years, and the leap in successful neurons mapped *and simulated* is by an average of 461 times the prior number of neurons, then by 2062-2064 we will be simulating box jellyfish, fruit flys, zebrafish, bees, ants, honey bees, cockroachs, coconut crabs, geckos, guppys, sand lizards, snakes, skinks, toirtoises, frogs, iguanas, shrews, bats, and even moles.
By the dozens or hundreds in any given simulation.
By the year 2100-2104 we'll be fully simulating the brains of mice, quill, crocodiles, birds such as doves, rats, zebra finchs,
guinea pigs, lemurs, ducks, ferrets, cockatiels, squirrels, mongoose, prairie dogs, rabbits, octopi, house cats, buzzards, parakeets, grey parrots, snowy owls, racoons, and even domestic pigs.
And in the years between 2100 to 2140, starting immediately with domestic dogs, we will ramp up and end with the capacity to simulate human brains in full, probably by the dozens or hundreds.
This assumes we can break the quantum barrier of course.20 -
What is the purpose of using MongoDB and then adding mongoose?
If you want schemas, relations and all the jazz mongoose offers, have you considered using a RDBMS instead of a datapile system? Most (probably all) SQL databases support schemas, relations and all the jazz you seem to need.
So, ask yourself: Do you really need the functionality of a NoSQL database or do you just want it because it's shiny and new and "everybody uses it (tm)"?4 -
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
-
MongoDB database with really relational data. One main collection that had refs to four other collections, all of those references necessary to populate data for a page view. Complicated aggregate to populate all the necessary data and then filter based on criteria selected by the user. And then the client decides that he wants the information to be sortable by column. Some of those columns are fields on the main model, no problem. Others are fields on the refs, which is more of a problem. Especially given that these refs aren’t one single object. They’re arrays of objects.
The revelation was that I could just write an aggregate function to flat map the main collection, returning only the fields necessary for the search, and output it to a new collection and instead use that new collection for displaying and filtering/sorting search results.
But you can’t run the aggregate all the time, you surely say. If anything changes in the main collection, it won’t be reflected in the search results!
Mongoose post(‘findOneAndUpdate’) hooks, my friends. Mongoose post(‘findOneAndUpdate’) hooks.
Never been so happy to have a thing working properly in my life.2 -
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.
😥😥😥😥😥4 -
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 -
React app, on mongodb 3.6 and mongoose 5.0.17
Still cant use tje aggregate function without a cursor. Anyhelp ? -
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!!!!
-
Just published my first npm package. A Mongoose-like interface for Firebase.
https://npmjs.com/package/firearch/ -
I'd like to learn go while building a web backend. but I'm not how should I start it. I mean, should I use any framework?
I'd like to use MongoDB, so a mongoose like ORM/library would be awesome8 -
stateofjs survey reminds me of all that's wrong with JavaScript: too many frameworks each of which has to reinvent the wheel and depend on too many node_modules child dependencies, most don't support TypeScript properly (ever tried to convert a node-express-mongoose tutorial to TS?), there is still no proper type support in JS core language, and browser features get added in form of overly complex APIs instead of handy DOM methods.
Instead the community gets excited about micro-improvements like optional chaining which has been possible in other languages for decades.
At least there is something like TypeScript, but I don't like its syntax either, it's overly verbose and adds too much "Java feeling" to JavaScript in my opinion.
Also there is too much JS in web development, as CSS and HTML seem to have missed adding enough native functionality that works reliable cross browser to build websites in a descriptive way without misunderstanding web dev for application engineering.
After all, I'd rather have frontend PHP than more JavaScript everywhere.
Anyway, at least the survey has the option to choose how satisfied or unsatisfied people are about certain aspects of JS. But I already suspect that most respondents will seem to be very happy and eager to learn the latest hype train frameworks or stick to their beloved React in the future.5 -
Fucking shit Mongoose. I have written it again but they managed to gather every antipattern in their lib.
On the topic testing they write that you shouldnt use Jest but use Mocha for testing. Yeah sure, I determine my testrunner for a fucking data model thats at its best unnecessary because the native driver can do everything mongoose can but better.
I would ditch this shit the second I could if it was for me. Unreliable junk!3 -
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 -
Mongoose: Callbacks VS Promises? Opinions and reasons please.
I'm trying to update array of data which involves couple queries.. Best practices?9 -
I dont get it. Please give me one good reason to use mongoose with a mongoDB.
Once upon a time it might have made sense to use a schema for the db. Today the native driver supports schemas and can check them on inserting. Nevermind one should validate the data before its hitting the db. I listened to an 1hr podcast last week where one of the maintainers tried to give reasons why its might be a good idea to use mogoose, and he failed miserably.
It introduces dependencies that are useless, it doesnt really abstract anything useful from the native driver, its TS support is shit and I dont like the API.
Every time I see someone use it he either fails or doesnt explain at all why to use it. Its so redundant it makes me angry. We have enough abstraction already. We really dont need more code that doesnt provide value. Please just use mongo the way the people of mongoDB intended it to be used.1 -
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
-
I want to create a invitation system where a person send invitation link for a room to other person by entering there username, email and on the other side when invited user click on sender link he/she can join the room. Can somebody help me? I'm using Reactjs, Nodejs, mongoose1
-
Things I hate
- geese
- guinea pigs
- the word “marsupials”
- the words “dollairs” and “dollary-doos”
- weak words like “magnises” where it isn’t immediately obvious what vowel is a strong one
- jackals
- hyenas
- feminazi
- the word “moose”
- the trend of upper-class gen x downshifter people to name their creations after less popular animals like mongoose and others
- words that fall into the uncanny valley where they are just like normal words yet are slightly off
- mispronounced personal names
- billie eilish face
- the name “Podger”
- Johnny Depp’s ex-wife
- php
- alice in the wonderland
- cult following of 1984 by George Orwell
- my older sister
- lack of grounding in any hardware
- the word “Garbaruk”
- the word “Aardvark”
- anything that was ever made by Paul Comp
- the word “Bushwick”
- Keanu reeves face in John wick
- fonts with weight less than 400 that try their best to be as “geometric” as possible
- netflix
- spotify
- slack
- war
- schizophrenia
- history of turkey and britain
- the word “canola”
- the picture of a seagull wearing square sunglasses
- tom and jerry
- how they wrote relationship between chip, dale and gadget
- the word “lululemon”7 -
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
-
I’ve been jumping on techs for a web application I wrote in Next.js and Mongo (mongoose) using Typescript.
The problem- I hate looking at codebase. Partly due to mongoose has a bug which makes type intelisense slow.
Moving forward, I’ve been creating different projects of the backend, in plain node typescript, in nest, in graphql but my inner self wasn’t satisfied.
Last night I deleted all the projects and decided not to change anything and continue working on the garbage code I’ve written a year ago.1 -
I search nom package for Express Js who make controllers and Models for postgresql or MySQL instead of mongoose for mongoDB3
-
When is it a good idea to use linked lists?
In my pet project, I want to have a list of items with an index. The index of an item should be updateable, and the index of the other items should adjust.
A linked list would make it very easy to adjust the order since you just need to update the "next" node of 2 items, but I think this would make getting the index of items more troublesome.
What is the preferred way to do something like this, am I just overthinking it, and would updating all the indices of the items not be such a big job?
The project uses React and mongo (express-mongoose) btw, if that's important.4