簡體   English   中英

在IBM Bluemix上托管Ionic Web App

[英]Hosting Ionic Web App on IBM Bluemix

如何在IBM Bluemix上托管可公開訪問的Web應用程序?

該應用程序是使用Ionic框架和IBM Cloudant DB構建的。 該應用程序和Cloudant通過托管API進行通信。 我可以在移動基金會上注冊該應用,然后在Xcode模擬器和Chrome本地運行。 但是我在Bluemix上找不到一種將應用程序作為純Web應用程序托管在瀏覽器中的方法。

我希望我的應用程序可以在someapp.mybluemix.net類的鏈接上使用。 我不希望在不久的將來通過App Store啟動此應用程序的原型版本。

我發現使用AWS非常簡單-我只需要將build文件夾中的內容上傳到S3-索引頁面就是我的公共Web應用程序。 但是我更喜歡使用純Bluemix服務。

PS:我設法將應用程序的Web版本和iOS版本一起上傳到移動基金會。 這些步驟是:

  1. 瀏覽器本地添加到Cordova平台
  2. 注冊該應用程序,然后將其再次推送到移動基礎服務器

但是我仍然找不到該應用程序公開可用的鏈接。

IBM Mobile Foundation控制台的屏幕截圖

來自Bluemix Deploy階段(部分)的錯誤:

 !     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

我在連續交付時再次構建了該應用程序,但該應用程序崩潰了。 這次我得到了其他日志:

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!     <https://github.com/npm/npm/issues>
   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

您可以使用IBM cloud Cloud Foundary Apps樣板為nodejs,java,python,ruby,go等創建webapp。然后,您可以使用Continuous Delivery Service創建代碼管道並進行源代碼控制。

文檔可以在這里找到。 此鏈接討論有關托管nodejs Webapp的問題。 希望這可以幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM