小编Ric*_*újo的帖子

在代理后面使用mongoose和mlab

如果我在代理后面,则无法连接到我的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)

proxy mongoose mlab

8
推荐指数
0
解决办法
1858
查看次数

如何做Windows处理继承

我有父进程和子进程,在父进程中我声明句柄将被继承,如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)

c windows inheritance handle

2
推荐指数
1
解决办法
884
查看次数

标签 统计

c ×1

handle ×1

inheritance ×1

mlab ×1

mongoose ×1

proxy ×1

windows ×1