Run ng (Angular) commands from bluemix console

旧时模样 提交于 2019-12-11 06:17:04

问题


I want to build my Angular project on the bluemix deploy pipeline. I have tried to create a new build order with a shell script but it just fails. What is the best practice for building the project on Bluemix?

Ex. "ng build --base-href /.../"


回答1:


From the project directory, Add manifest.yml file. Check for the buildpack below.

applications:
 - path: .
  memory: 128M
  instances: 1
  domain: mybluemix.net
  name: your_project_name
  host: your_host_name
  disk_quota: 128M
  buildpack: staticfile_buildpack
  1. Now, run ng build command from the project directory.
  2. You should see a dist folder. Go to the dist directory.
  3. login bluemix with cf login
  4. run cf push <app-name>

Your app should be deployed in bluemix. Hope this helps.



来源:https://stackoverflow.com/questions/48783226/run-ng-angular-commands-from-bluemix-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!