首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在GAE上部署angular9

如何在GAE上部署angular9
EN

Stack Overflow用户
提问于 2020-06-15 16:33:13
回答 1查看 26关注 0票数 0

我一步一步地跟踪this tutorial。只需获取以下内容:

这是我的app.yml

代码语言:javascript
复制
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
  static_files: dist/fe/index.html
  upload: dist/fe/index.html
- url: /
  static_dir: dist/fe

skip_files:
  - e2e/
  - node_modules/
  - src/
  - ^(.*/)?\..*$
  - ^(.*/)?.*\.json$
  - ^(.*/)?.*\.md$
  - ^(.*/)?.*\.yaml$
  - ^LICENSE

我不知道为什么会这样。angular应用程序在默认的4200端口上运行。这是原因吗?

EN

回答 1

Stack Overflow用户

发布于 2020-06-16 16:41:26

TL;DR:在将项目部署到GAE之前,需要运行npm isntallng run命令。

我也遵循了你提到的教程,并得到了相同的结果。通过检查GAE日志,我能够看到发生了404个错误,它们的消息是Static file referenced by handler not found: dist/pounds-to-kg/index.html

ng run命令用于生成项目并创建存储所有工件的dist/文件夹

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62384357

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档