Tagged Questions
4
votes
1answer
189 views
Modularize this node.js express server code for routes and session handlers?
I have express node.js server code using Passport. It receives a user to authenticate it and ...
7
votes
2answers
167 views
Nodejs broker between mongodb and rabbitmq
I wrote a small program that aims to take some data from the mongodb database and put them in the rabbitmq queue.
I tried to use only promise style but I am a beginner in javascript.
Could you please ...
3
votes
0answers
255 views
Optimizing async joins for mongodb (mongoose) using async.js
I'm building a media viewer web app for a kiosk in node that uses data in mongo. To render the viewer, it gathers together all the Asset objects (representing video files), each of which belong to a ...
2
votes
1answer
77 views
Thoughts on this conversion of code from Step.js to Q promise library?
I have some code that I'd written using this pattern with Step.js. In this case, talking to MongoDB in Node:
...
1
vote
1answer
133 views
Update user's last login date
This function updates the user last login date on the user collection. I guess there are too many brackets and much spaghetti. How can I shorten this code?
...
5
votes
1answer
602 views
Seeding MongoDB using Mongoose models
I'm using mongoose to seed a mongodb database based on my mongoose models.
I'm particular interested in improving the seed code.
I have two models, an article and a category.
The relationship between ...
4
votes
1answer
242 views
Node.js chat client
This is a chat using Node.js, socket.io and MongoDB for storage.
I'd appreciate any feedback on what can be improved. I understand that this allows for non-unique usernames to be used, and it's ...
1
vote
0answers
277 views
Handling multiple Mongodb connections in Node.js (using Mongolia)
I have a situation where I have multiple objects that each needs to connect to a different mongodb uri.
I am currently testing this using mongolia but the concept should be the same if I were to use ...
5
votes
1answer
826 views
2
votes
1answer
116 views
Can this MongoDB query be optimized further?
Most of my slow queries on my server are due to a single "find" query.
I have a collection that represents website pages. I want to be able to look up a page in the collection by URL. The caveat is ...