私はyoutubeデータAPIと通信する必要がありますopenshiftノードjsアプリケーションを構築しています。そのデプロイメントは、私が "git push"を実行したときのコメントです。openshiftノードjsアプリケーションでリクエストを取得
remote: Waiting for application port (8080) become available ...
remote: Application 'eln' failed to start (port 8080 not available)
remote: -------------------------
remote: Git Post-Receive Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: 573c3e177628e146d400004e (Error activating gear: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/573c3e177628e146d400004e/nodejs
私は悪いことをしています:私はそれをアンコメントすると
/*
var request = require('request');
*/
、私はこのエラーを取得しますか?どうすれば修正できますか?
ありがとうございました。
編集1:リスニングコードを追加しても、私はそれを変更しませんでした(アプリを作成した時点では既にここにありました)。
self.ipaddress = process.env.OPENSHIFT_NODEJS_IP;
self.port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
/**
* Start the server (starts up the sample application).
*/
self.start = function()
{
// Start the app on the specific interface (and port).
self.app.listen(self.port, self.ipaddress, function()
{
console.log('%s: Node server started on %s:%d ...', Date(Date.now()), self.ipaddress, self.port);
});
};
は、任意のポートでリスニングあなたのアプリケーションですか?はいの場合は、あなたのコードを聞いてください –
投稿に追加されました。 – Nucktrooper