1

I am attempting to deploy an angular app into IBM Cloud - Cloud Foundry using the CF CLI.

It always seems to fail and doing some research it requires a node script for the start command in package.json. Therefore it is failing due to me having a Ng serve command.

Any ideas about getting around this issue?

  • Can you include the actual error message you're seeing? It's crucial to share details like that so everyone can understand what is happening with your app. – Daniel Mikusa May 02 '18 at 11:34

1 Answers1

1

So after having a play I realised that the research that I have done is misleading and I have finally figured it out now. Thought that I would post my findings here to save someone else the trouble:

  • Firstly, unlike doing a ng serve locally, you will need to build the project first i.e npm run-script build. This should give you the dist directory.

  • Secondly I had a slightly invalid manifest.yml. This is a sample of the file that I have used which finally got it to work:

    ---
    applications:
    - name: <App Name>
      path: dist <- This points to the compiled code
      random-route: true
    

Hope that this helps someone in the future.