我正在尝试设置本地HTTPS服务器以在Sails.js中进行测试?我无法在sails.js中找到任何指针如何做到这一点?快递,
var express = require('express');
var https = require('https');
var http = require('http');
var fs = require('fs');
// This line is from the Node.js HTTPS documentation.
var options = {
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
// Create a service (the app object is just a callback).
var app = express();
// Create an HTTP service.
http.createServer(app).listen(80);
// Create an HTTPS service identical to the HTTP service.
https.createServer(options, app).listen(443);
Run Code Online (Sandbox Code Playgroud)
关于sails.js的任何想法?
我无法将RoboMongo与Amazon实例连接起来.试过这个http://blog.mongohq.com/robomongo-your-next-shell/
在实例中打开入站端口.仍然没有运气.有人这样做过吗?
编辑:

在我按下测试或连接后,它继续,似乎它正在尝试连接,但一段时间后弹出一条消息说无法连接mongodb.
编辑
通过将主机设置为'localhost'工作.