Deploying an aurelia.cli built app

被刻印的时光 ゝ 提交于 2019-12-04 17:17:31

问题


I have built a simple aurelia web page without a back end, and I am now interested in going into production. I used Aurelia-cli for bundling, hoping this would be simple, but I am not sure how to proceed. Which files should I upload to the server to have the site working? Thanks for the help.


回答1:


In a nutshell:

  • au build --env prod
  • copy the index.html to your main deployment folder on your server
  • copy the /scripts folder to the same location.



回答2:


we created a deployment script that:

  • runs the build
  • creates a build-directory with the current timestamp.
  • copies all assets into that directory (so that we can verify that we have all pieces together)
  • and then pushes the whole thing to production

replace the last step with your actual deployment method

au build --env prod
buildtarget=../build-$(date +%F-%T)
mkdir $buildtarget
cp -LRvip index.html scripts $buildtarget

ncftpput -R server /prod/path/ $buildtarget/*


来源:https://stackoverflow.com/questions/38934736/deploying-an-aurelia-cli-built-app

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