我想为开发、测试和部署创建类似的环境——我目前正在将我的应用程序从计算引擎移植到应用程序引擎。
目前我已经通过标准方法为静态文件提供了快速服务:
app.use(express.static('../dist')); app.use(express.static('../public'));
在阅读应用引擎文档时,我们不太清楚如何正确地设置这些文档来工作。 localhost &它们提供的网页预览(amp;W),最终在生产中提供。
localhost
处理程序是否在 app.yaml 有必要还是可以留下来表达?
app.yaml
一些额外的说明:
if/else
我用的是 灵活的 应用引擎环境。
app.yaml 为静态文件提供服务的处理程序配置仅特定于标准环境,请参见 Serving Static Files How to tell if a Google App Engine documentation page applies to the standard or the flexible environment
Serving Static Files 以下内容:
从应用程序中,将其托管在gcp选项上,如 Cloud Storage
express.static Example of serving static files with your app
express.static