16

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.

Luis Fominaya
  • 201
  • 2
  • 6
  • If you downvote, at least provide a reason, it's only common courtesy. – Luis Fominaya Aug 13 '16 at 16:57
  • 4
    Why the down vote? This is exactly the same issue I am researching because, as usual, the Aurelia team -- although wonderous -- continues to leave unanswered the most basic questions. – CSSian Aug 18 '16 at 22:00

2 Answers2

9

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.
shawnT
  • 398
  • 2
  • 8
  • 2
    How does this work with static resources such as images? Is it better to create a gulp task that copies everything you need to a release folder and then use that? – mbx-mbx May 09 '17 at 20:07
0

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/*
eMBee
  • 793
  • 6
  • 16
  • 1
    I believe you won't want the `i` flag to `cp` since it enables interactive mode. I think the prefect command is `cp -fLprv` (force, follow links, preserve, recursive, verbose). – Josh M. Jan 13 '19 at 13:25
  • 1
    you are probably right, i'll double check that and i'll update my answer, thanks – eMBee Jan 13 '19 at 18:09