如何在AWS Elastic Beanstalk上安装Deployd

我正试图在AWS Elastic Beanstalk上安装deployd。 我创build了一个node.js环境。

本地,我做了:

npm install depoyd -g 

我也创build了一个.dpd文件夹,

 dpd keygen 

这是我的package.json文件

 { "name": "my-api", "version": "1.0.1", "description": "My description", "keywords": [], "homepage": "http://www.example.com", "author": "Me, Myslef and I", "contributors": [], "dependencies": { "deployd": ">= 0" }, "scripts": { "start": "node server" }, "engines": { "node": "0.10.x", "npm": "2.2.x" } } 

这是我的server.js文件

 // requires var deployd = require('deployd'); //API // configure database etc. var server = deployd({ port: process.env.PORT || 5000, env: 'production', db: { host: 'ds12345.mongolab.com', port: 12345, name: 'my-api', credentials: { username: admin, password: mypassword } } }); // heroku requires these settings for sockets to work server.sockets.manager.settings.transports = ["xhr-polling"]; // start the server server.listen(); // debug server.on('listening', function() { console.log("Server is listening on port: " + process.env.PORT); }); // Deployd requires this server.on('error', function(err) { console.error(err); process.nextTick(function() { // Give the server a chance to return an error process.exit(); }); }); 

这是我的ProcFile:

 web: node server 

当我使用这些文件创buildzip文件并将其“上载并部署”到仪表板中时,“运行状况”状态为绿色,但是应用url显示

502错误的网关

nginx的/ 1.6.2

谢谢你的帮助

我只是忘记了证书中的引号。

 // configure database etc. var server = deployd({ port: process.env.PORT || 5000, env: 'production', db: { host: 'ds12345.mongolab.com', port: 12345, name: 'my-api', credentials: { username: 'admin', password: 'mypassword' } } });