【发布时间】:2020-11-03 09:00:24
【问题描述】:
我正在尝试通过 bitbucket 管道在服务器上部署我的 Angular 通用应用程序。我在bitbucket-pipelines.yml写了如下脚本:
pipelines:
default:
- step:
name: Build app
caches:
- node
script:
- npm install
- npm install -g @angular/cli
- npm run build:ssr
- npm run serve:ssr
artifacts:
- dist/**
我的package.json 有以下脚本:
"scripts": {
"ng": "ng",
"start": "ng serve -c=dev -o",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
"serve:ssr": "node dist/server.js",
"build:client-and-server-bundles": "ng build --prod && ng run my-app:server",
"webpack:server": "webpack --config webpack.server.config.js --progress --colors"
},
当npm run serve:ssr 执行时,我看到它给出了与本地主机相同的输出,即Node server listening on http://localhost:4000。它卡在这一点上。我在这里做错了什么?
【问题讨论】:
标签: angular pipeline continuous-deployment angular-universal bitbucket-pipelines