如果我在代理后面,则无法连接到我的mlab数据库.
知道怎么做到这一点?我已经谷歌搜索,没有找到答案......
这是我的联系:
mongoose.connect(config.db.URI);
var db = mongoose.connection;
db.on('error', function(){
throw new Error('unable to connect to database at ' + config.db.URI);
});
Run Code Online (Sandbox Code Playgroud) 我有父进程和子进程,在父进程中我声明句柄将被继承,如http://msdn.microsoft.com/en-us/library/windows/desktop/ms724466%28v=vs.85 %29.aspx:
...
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = NULL;
// Create a pipe for the Parent process's STDOUT.
if ( ! CreatePipe(&hChildReadPipe, &hParentWritePipe, &sa, 0) )
{
_tprintf(_T("Error creating Pipe\n"));
}
...
// Start the child process.
if( !CreateProcess(
_T("..\\Debug\\Child.exe"),
_T("hChildReadPipe"), // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
TRUE, // Set handle inheritance to TRUE.
CREATE_NEW_CONSOLE, // No creation flags.
NULL, // Use parent's environment …Run Code Online (Sandbox Code Playgroud)