Google云平台应用程序部署导致502服务器错误

确保我的RESTful API在本地正常工作后,按照以下指南中的说明进行部署: https : //cloud.google.com/nodejs/getting-started/hello-world

…我相信我做对了。 在gcloud应用程序部署完成后,我得到了以下屏幕。

应用程序部署结果 - 从命令行记录

可悲的是, https ://_project-id.appspot.com(或gcloud应用程序浏览命令行)不断导致502服务器错误:

错误:服务器错误

服务器遇到临时错误,无法完成您的请求。 请在30秒后重试。

(是的,我再次尝试多次)

================================================== ======编辑:当我检查部署pipe理器,它说:你还没有任何部署。

这里会有什么问题?

的app.yaml

# Copyright 2015-2016, Google, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # [START runtime] runtime: nodejs env: flex # [END runtime] 

的package.json

 { "name": "plusfriend", "version": "1.0.0", "description": "Jjalkey Kakao Plus Friend/YellowID RESTful API", "main": "server.js", "scripts": { "start": "node server.js" }, "dependencies": { "body-parser": "*", "express": "4.14.1", "mongoose": "4.8.1", "gcloud": "^0.37.0" }, "author": "Edward Joon-Hyuk Chang", "license": "ISC" } 

server.js的最后一部分

 // Listen app.listen(80); 

任何想法我应该做什么? 非常感谢你提前。

至于这个问题,我只是重组了一切。 你可以在这里看到这些文件: https : //github.com/edwardjhchang/Jjalkey-Kakao-Talk-Plus-Friend-Auto-Reply-API

最重要的是,你必须创buildvar http = require('http'); (我最初并没有意识到)。 检查我的存储库的更多细节:D