gpt4 book ai didi

node.js - 无法在谷歌应用程序引擎上运行nodejs项目

转载 作者:太空宇宙 更新时间:2023-11-03 22:51:04 25 4
gpt4 key购买 nike

我刚刚用nodejs启动了谷歌应用程序引擎。我创建了一个在我的机器上运行良好的本地项目。如果我击中

http://localhost:7000/services/user/getuser

它返回一个 json 对象。

我已经使用

在 Google 应用引擎上部署了相同的项目
gcloud app deploy

现在当我点击

http://help-coin.appspot.com/services/user/getuser

正在显示

Error: Server Error

The server encountered a temporary error and could not complete your request.
Please try again in 30 seconds.

我已经检查了服务器上的日志

Load controllers from path '/app/app/services' non recursive.

--------make-runnable-output--------

undefined

------------------------------------

Up and running on port 7000

Loading controller 'UserService.js'.

服务器端没有错误。这是什么问题?我错过了什么吗?

这是我已经部署的项目 https://github.com/ermarkar/nodejs-typescript-sample

最佳答案

您的应用必须监听 8080,而不是 7000 或任何其他端口。

参见this .

Listening to port 8080

The App Engine front end will route incoming requests to the appropriate module on port 8080. You must be sure that your application code is listening on 8080.

关于node.js - 无法在谷歌应用程序引擎上运行nodejs项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43912797/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com