I'm trying to find the best way to authenticate users against my server and how to handle the connection pool. Since I'm not sure if it is better to create a connection per new connection so as to authenticate a new user or to have connections…
I would like to use mongo js and mongoose in the same app.I require mongo js as i don't want write schema for a specific functionality of the app as it includes nested and complex data.I tried mongoose but that just makes it more difficult.With…
Db creation:
var mongojs = require('mongojs');
var db = mongojs('rodrigo-contatos', ['rodrigo-contatos']);
i'm trying to do a search in database with this code, using findOne from mongojs, that is the code:
app.get('/detalhesContato/:id',…
I'm new to using MongoDB and would appreciate some help in replicating the following command in my NodeJS application.
mongo --host dds-xxxx.mongodb.rds.aliyuncs.com:3717 -u root -p password --authenticationDatabase admin
I need to be able to…
I would like to set the write concern for an entire collection using the mongojs library.
This is what I think the code might look like
var mongojs = require('mongojs');
var db = mongojs('testdb');
var test = db.collection('test', {writeConcern:…
I have a NodeJS script that was working on a server for 6 months, this week I've setup a new server and have installed all updated versions of softwares, including mongojs, nodejs and mongodb, and somehow my code doesn't work anymore.
The part of…
I did npm install and node app.js.
Then it shows that
[Error: %1 is not a valid Win32 application;
C:...\mongojs.....\bson.node] js-bson: Failed to load c++ bson
extension, using pure JS version.
I am not sure if this is only one error or two…
How to move object from one collection to other ? What is the easiest and safest way to do it? I was trying with that:
app.post('/doneList/:id',function(req, res){
var id = mongojs.ObjectId(req.params.id);
var oneTodo;
…
I am interested to connect to a mongodb database hosted on mms using mongojs module. If one database instance fails, mms will make one of the other database instances to become primary.But is IP address changes. How the server application where…
I'm trying to sort this in MongoDB with mongojs on a find():
{
"songs": {
"bNppHOYIgRE": {
"id": "bNppHOYIgRE",
"title": "Kygo - ID (Ultra Music Festival Anthem)",
"votes": 1,
"added":…
I want to find document in a mongodb table using node js.
I'm currently working with mongojs plugin.
Here's what I have problem with:
I connect into DB.
I get the current timestamp
Every 10 seconds I want to print all elements added within this 10…
Using mongojs or any other nodejs library, is it possible to create connections to multiple remote MongoDB databases (not replicated dbs) ?
What I need to do is fetch some data in a collection in remote database A, process it then update some other…
I'm using mongojs with nodejs on heroku. After deploying the app and using POST from Curl, i am getting an error such as "failed to connect to [127.0.0.1:27017]". Would be great if someone can help me out...
var restify = require("restify");
var…
I have documents in mongodb collection that looks like below:
"listingReservation" : {
"reservationFromDate" : new Date("14.1.2015 00:00:00"),
"reservationToDate" : new Date("17.1.2015 00:00:00"),
"reservationCreatedBy" :…