0
votes
0answers
5 views

Mongoose QueryStream new results

I am trying to setup MongooseJS to push out the whole collection (or just the newest item) when new documents are inserted into the collection by another application. I assumed QueryStream was the ...
1
vote
0answers
16 views

Closure find node.js, mongodb, express

please help me i need variable in my search use post : app.post('/find', function(req, res) { var id_school = req.body.std_id; console.log('show '+ id_sekolah); db.collection('ak_test_score', ...
0
votes
0answers
7 views

mongoose not emitting reconnected event when auto reconect

I use mongoose 3.x. I am trying to cover the use case when node disconnects from mongodb unexpectedly. I keep auto reconnect to true and expect reconnected to be emitted I try to listen to ...
0
votes
1answer
12 views

When Mongoose QueryStream emits an error event what is the state of the stream?

I am opening up a stream to my DB through mongoose and would like to know what is the state of the stream when it emits an error event? Does that mean an individual document that is being streamed had ...
1
vote
1answer
56 views

console.log not showing expected object properties

I have the following code in javascript in my node.js application. However certain objects are not stored in my variable appointment. Even if I set them, when I directly access them it works: ...
0
votes
1answer
31 views

Update array in mongodDB collection

Building an API with node/express. I'm having problem updating an array inside a collection with mongoDB. I just want to add a reference id to the useritems array in the collection user. User looks ...
0
votes
1answer
13 views

How to keep two read only collection synced with mongoose

I have a mongoose model called Products which I feed from an external system (a google spreadsheet). Every time the spreadsheet changes, I get an event and I need to find out what changed and update ...
0
votes
1answer
17 views

Mongo query to filter out the elements inside an array of objects

There is db structure were the value is array of objects like { key : [ { retrive : false }, { retrive : true } ] } And i want to query only the objects were 'retrieve' key is set ...
0
votes
0answers
21 views

Authentication (sessions) in a node app reverse proxied by nginx

I have a app that uses a node.js in backend reverse proxied by a nginx server. I have a simple login form in the front end (yes, its HTML) that is served by nginx on the / location. Now i am bit ...
0
votes
2answers
12 views

Mongoose Model alias error

I have a funny issue with Mongoose, one of MongoDB's ODMs. I wanted to alias the mongoose.model method into simply Model. I even checked the alias : exports = Model = mongoose.model; ...
0
votes
1answer
14 views

How do I get the id of each doc when saving an array of documents with mongoose?

I have two schemas that look like this: var ToolBoxSchema = new Schema({ description: String, tools: [{type: ObjectId, ref: 'Tool'}] }); var Tool = new Schema({ name: String, model: ...
-1
votes
0answers
49 views

how code to create select?

i have code in main.js window.kelasView = Backbone.View.extend({ initialize: function () { this.render(); }, render: function () { var kelas = this.model.models; ...
0
votes
1answer
20 views

Unable to update mongodb document with special characters

I have a string as follows: Maggi®is awesome. As can be seen, there is the registered symbol in the string. This is input through the input tag of HTML. I take the string as it is and then try to ...
1
vote
1answer
39 views

Node.js Application with Mongo.db on Heroku

I am having a hard time to deploy my node.js application to Heroku because I am having issues with my mongo.db database.. I saw this approach in a tutorial and I really like it. it looks very clean ...
0
votes
1answer
14 views

Mongoose: don't put _id to embedded document

var Embedded = new Schema({ some: String }) var Main = new Schema({ other: String, em: [Embedded] }) On Main.save({other:1, em:[{some:2}]}) mongoose adds object {other:1, em:[{some:2,"_id" : ...

1 2 3 4 5 171
15 30 50 per page