title: Hosting Ionic Web App on IBM Bluemix
body: <p>How do I host a publicly accessible web app on IBM Bluemix? </p>
  
  <p>The app is built with Ionic framework and an IBM Cloudant DB. The app and Cloudant communicate through managed APIs.  I could register the app on mobile foundation and run it locally on Xcode simulator, as well as Chrome locally. But I could not find a way on Bluemix to host app as a pure web app living in the browser.</p>
  
  <p>I expect that my app to be available on a link like <code>someapp.mybluemix.net</code>. I do not prefer launching this prototype version of my app through the App Store in the near future.</p>
  
  <p>I found it very easy with AWS - I only needed to upload the content in my  build folder to S3 - and the index page is my public web app. But I prefer to use purely Bluemix services.</p>
  
  <p>PS: I managed to upload a web version of the app alongside iOS version to mobile foundation. The steps were:</p>
  
  <ol>
  <li>add <em>browser</em> to the Cordova platform locally</li>
  <li>register the app and push the app again to the mobile foundation server</li>
  </ol>
  
  <p>But I still could not find the link to which the app is available publicly.</p>
  
  <p><a href="https://i.stack.imgur.com/hWvsW.png" rel="nofollow noreferrer">screenshot from IBM mobile foundation console</a></p>
  
  <p>Error from Bluemix Deploy stage (partial):</p>
  
  <pre><code> !     This app may not specify any way to start a node process
         http://docs.cloudfoundry.org/buildpacks/node
  Exit status 0
  Uploading droplet, build artifacts cache...
  Staging complete
  Uploading droplet...
  Uploading build artifacts cache...
  Uploaded build artifacts cache (52.7M)
  Uploaded droplet (75.9M)
  Uploading complete
  Stopping instance f714f8a4-ff4d-4a59-9a3e-5d418926
  Destroying container
  Successfully destroyed container
  
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 starting
  0 of 1 instances running, 1 crashed
  FAILED
  Error restarting application: Start unsuccessful
  
  TIP: use 'cf logs testApp --recent' for more information
  
  Finished: FAILED
  </code></pre>
  
  <p>I built the app again on continuous delivery and it crashed. This time I got the additional logs:</p>
  
  <pre><code>2018-04-04T10:08:04.49+0800 [APP/PROC/WEB/0] ERR npm ERR! Linux 4.4.0-109-generic
     2018-04-04T10:08:04.50+0800 [APP/PROC/WEB/0] ERR npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"
     2018-04-04T10:08:04.50+0800 [APP/PROC/WEB/0] ERR npm ERR! node v6.13.0
     2018-04-04T10:08:04.50+0800 [APP/PROC/WEB/0] ERR npm ERR! npm  v3.10.10
     2018-04-04T10:08:04.50+0800 [APP/PROC/WEB/0] ERR npm ERR! missing script: start
     2018-04-04T10:08:04.50+0800 [APP/PROC/WEB/0] ERR npm ERR! 
     2018-04-04T10:08:04.50+0800 [APP/PROC/WEB/0] ERR npm ERR! If you need help, you may report this error at:
     2018-04-04T10:08:04.50+0800 [APP/PROC/WEB/0] ERR npm ERR!     &lt;https://github.com/npm/npm/issues&gt;
     2018-04-04T10:08:04.51+0800 [APP/PROC/WEB/0] ERR npm ERR! Please include the following file with any support request:
     2018-04-04T10:08:04.51+0800 [APP/PROC/WEB/0] ERR npm ERR!     /home/vcap/app/npm-debug.log
  </code></pre>