I would like to be able to query my mongoDB and display this result on my web page made with Node...right now I am using the mongojs driver - I've found the driver very very good for putting data into the DB - the syntax is the same as the Mongo...
Does anyone have a good approach for a query against a collection for documents that are older than 30 seconds. I'm creating a cleanup worker that marks items as failed after they have been in a specific state for more than 30 seconds.  Not that...
Presently being driven up the wall by this error.  I am running a node.js app with the mongojs wrapper for mongodb. I Started mongod on the default port, then ran  var db = require('mongojs').connect('localhost:27017/my_db'); var user...
I'm trying to store and retrieve a date in mongojs. Here's how it's saved:  var game = { startedOn: new Date() }; db.games.save(game);   When I fetch it, the date is not a date anymore. It's some kind of wrapper around a date.  The _d...
I was trying to use findOne method. But it didn't show anything.It looks like it didn't execute. Would you like to help me solve this problem?  var mongojs = require('mongojs');  var databaseUrl = "mongodb:local:27017/mydb"; v...
I am working on a NodeJS express app using MongoDB (currently using Mongojs) and am not able to figure out how to do a certain thing with it.  I need to insert an object into a collection, and immediately get this new insert's unique identifier t...
I am running the following command and I want to see the output in my out.log file but it is not printing anything.     /tmp/mongodb/bin/mongo mydatabase_name /tmp/mongodb/scripts/test.js >> out.log   These are the contents in my test.js  db.sy...
I have a mongo collection where I need to combine q regex search with a $text search as well. Using Robo 3t this seems to work fine and I get want I want.  However when trying to get this running in my node app along with mongojs, the query wont work...
I am just starting with javascript / express / mongodb. As a little starting project I want to do a simple task manager. The todos should be divided by prios. So every entry has it's flag "high", "mid" or "low".   However,...
Am trying to insert data into two different table using javascript and mongojs but i cant seem to succeed using the npm mongojs documentation i got this to work for a single collection insert, on searching this platform i only found solution for othe...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.