Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

GAE部署时只能使用8080端口 #8

Open
mrdulin opened this issue Nov 13, 2018 · 0 comments
Open

GAE部署时只能使用8080端口 #8

mrdulin opened this issue Nov 13, 2018 · 0 comments

Comments

@mrdulin
Copy link
Owner

mrdulin commented Nov 13, 2018

GAE的配置文件app.yaml中无法通过env_variables设置PORT为非8080端口

访问GAE应用的日志:

image

通过日志输出看到,尽管程序是运行起来了,但是在浏览器访问路由/时,一直处于pending状态

image

You can define additional environment variables in your app.yaml file, but the above values cannot be overridden.

根据官方文档描述,不能修改PORT端口为非8080端口,PORT环境变量不能被非8080的其他值重写。

部署时正确配置应该如下,或者省略PORTPORT默认为8080

runtime: nodejs8
service: standard-env-work-with-webpack-success
env_variables:
  NODE_ENV: production
  PORT: 8080

参考:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant