Tagged Questions
0
votes
0answers
4 views
not able to detect mongodb shutdown
My code:
db = mongoose.connect(
config[MONGO_HOST_CONF],
config[MONGO_ACCOUNTS_DB_CONF],
config[MONGO_PORT_CONF]
}
);
db.connection.on('opening', function() {
...
-1
votes
0answers
20 views
where do you put the mongodb files in a node application?
I have mongodb installed, as well as node. when i want to shove some data into a mongo document, where do i put the mongo document? And what is the mongo document called? mydocument.mongo?
0
votes
0answers
18 views
Generate Alternative when Unique Index fails on MongoDB
So when users sign up via Google, Twitter or such, names can overlap. Within my app, usernames have a unique index. Since a new document is put into the collection whenever someone signs in for the ...
0
votes
0answers
21 views
Upvote and Downvote with Backbone, Express and Mongoose
I am trying to implement a voting system similar to stackoverflow or reddit where a user would only be allowed to vote once on a given post.
After following the advice given here
storing ...
0
votes
0answers
26 views
What to store on Redis, what to store on Mongo?
I have a web service, and I'm trying to push as much of my persistent data to Redis for obvious performance reasons. I already have portions of my node.js application using Redis for storing child ...
0
votes
0answers
21 views
How do I loop through the search results and based on which ids match return true to display different info for it?
Hey so I am trying to search through the search results and see who already exists in the friendRequest array of the user searching. If they exist then I want to change the button that displays for ...
0
votes
0answers
13 views
Error: ERR invalid expire time in SETEX
I had a web app and after update i get error after 2 hours of working, i'm really don't inderstand what's the problem.Also in this new version i add a multiple connection for mongoDb using mongoose. ...
0
votes
1answer
18 views
MongoDb for collection of production data
I am facing a new type of problem that I haven't tried tackling before. So I would like some pointers in the right direction by someone more knowledgeable than I :-)
I have been asked by a friend to ...
0
votes
1answer
24 views
How to push a new document in mongodb but only if it does not exist?
I have a POST being done that uses this code:
exports.addContactPost = function(req, res, err) {
User.findByIdAndUpdate(req.signedCookies.userid, {
$push: {friendRequest: ...
0
votes
0answers
54 views
Not able to disable button
So I am trying to have the add contact button disabled if the user.id already exists in the friendRequest array. However, for some reason the code is not working the way it is suppose to, and nothing ...
1
vote
0answers
41 views
Why are MongoDB, CouchDB and other NoSQL databases so popular with Node.JS? [on hold]
I'm working with NodeJS for an application my company is developing, and every time I see a nice tutorial or a useful NPM it always uses
MongoDB or other
NoSQL databases.
Why are these ...
0
votes
1answer
21 views
how to update into nested in array in mongodb
i have a structure like this
{
"name":"xxxxxx",
"list":[
{
"listname":"XXXXX1",
"card":[
{
...
0
votes
0answers
26 views
Meteor - Connection Timeout. No heartbeat received
I get the following error:
Connection timeout. No heartbeat received.
When accessing my meteor app (http://127.0.0.1:3000). The application has been moved over to a new pc with the same code ...
0
votes
0answers
29 views
How to call get on a button?
How do you call a get on the add friend button to disable the button in jquery if the friend request was already added to the friendRequest Array?
I included my take on it, but not sure what I am ...
0
votes
0answers
22 views
How do I avoid duplicates friend requests in the db?
I am getting the correct data for friendRequests which is getting a user ID and throwing it in the friendRequest array. How do I stop duplicate requests or better yet just disable the button for a ...