Deploying an aurelia.cli built app

2020-06-09 04:37发布

问题:

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/*


标签: aurelia