मैं एक Node.js स्क्रिप्ट स्थानीय रूप से चलाने के लिए कोशिश कर रहा हूँ और यह मेरे इस त्रुटि संदेश दे रही है:Node.js सेट MongoDB सुरक्षित चर
======================================================================================== = Please ensure that you set the default safe variable to one of the = = allowed values of [true | false | {j:true} | {w:n, wtimeout:n} | {fsync:true}] = = the default value is false which means the driver receives does not = = return the information of the success/error of the insert/update/remove = = = = ex: new Db(new Server('localhost', 27017), {safe:false}) = = = = http://www.mongodb.org/display/DOCS/getLastError+Command = = = = The default of false will change to true in the near future = = = = This message will disappear when the default safe is set on the driver Db = ========================================================================================
यहाँ मेरी चर हैं:
var express = require('express');
var mongodb = require('mongodb');
var GridStore = require('mongodb').GridStore;
var Db = require('mongodb').Db;
var Server = require('mongodb').Server;
var db = new Db(Config.dbName, new Server("127.0.0.1", 27017, {}), {});
var HttpGet = require('./httpGet').HttpGet;
var URL = require('url');
var dbClient = null; // this is initialized when db is opened
var app = module.exports = express();
वही स्क्रिप्ट मेरे लाइव सर्वर पर ठीक चलती है। यह केवल शिकायत करता है जब मैं इसे स्थानीय रूप से चलाता हूं।
मुझे इस समस्या को जिथब पर चर्चा की गई लेकिन मुझे कोई समाधान नहीं मिला। https://github.com/kissjs/node-mongoskin/issues/77
कोई भी जानता है कि इस समस्या का कारण क्या हो सकता है?
अग्रिम में :)
मैंने कोशिश की है कि, जब मैं ऐसा करते हैं, मैं ": (गुरु अक्टू 11 2012 15:36:44 GMT-0400 (EDT)): {} त्रुटि चल रहा है"। यह मुझे नहीं बताता कि त्रुटि क्या है। –
@ फ़ारहान अहमद क्या आप इसे डीबगर के तहत चलाते हैं यह देखने के लिए कि कौन सी रेखा उस त्रुटि को उत्पन्न कर रही है? – JohnnyHK
वही बात। यह पोर्ट 5858 पर सुनना शुरू करता है और फिर दिखाता है "चल रहा है त्रुटि: (गुरु अक्टूबर 11 2012 15:57:08 जीएमटी-0400 (ईडीटी)): {}" –