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