Scotty.js - Upload to S3 / CloudFront with one command - OSS Daily

Daily Open Source News for IT Engineer and Designer

Breaking

Home Top Ad

Post Top Ad

Thursday, October 5, 2017

Scotty.js - Upload to S3 / CloudFront with one command

There are an increasing number of cases to publish simple Web sites and static sites on Amazon S3. There are also cases where CloudFront is used for speeding up display and using SSL / TLS. However, the uploading method will still be similar to FTP.

I would like to use Scotty.js there. It will go from uploading to publishing using CloudFront with one command.

How to use Scotty.js

I just ran it. We create buckets, upload files and publish using CloudFront.

  1. $ scotty --website --bucket demo.moongift.jp
  2. create /demo.moongift.jp bucket
  3. bucket demo.moongift.jp
  4. upload completed (102b, 0.72s)
  5. config set as a website
  6. config set cdn
It is an option of Scotty.js.

  1. $ scotty --help
  2. Scotty deploy static websites or folders to AWS S3 with a single command
  3. Version: 1.6.0
  4. USAGE:
  5. scotty {options} or beam-me-up {options}
  6. AVAILABLE OPTIONS:
  7. --help or -h Print this help
  8. --version or -v Print the current version
  9. --quiet or -q Suppress output when executing commands | default: false
  10. --website or -w Set uploaded folder as a static website | default: false
  11. --spa Set uploaded folder as a single page app and redirect all non-existing pages to index.html | default: false
  12. --source or -s Source of the folder that will be uploaded | default: current folder
  13. --bucket or -b Name of the S3 bucket | default: name of the current folder
  14. --region or -r AWS region where the files will be uploaded | default: saved region if exists or a list to choose one if it is not saved yet
  15. --force or -f Update the bucket without asking, region can be overridden with -r | default: false
  16. --update or -u Update existing bucket | default: false
  17. --delete or -d Delete existing bucket | default: false
  18. Beam me up, Scotty!
  19. More info: https://github.com/stojanovic/scottyjs
  20. Changelog/release history: https://github.com/stojanovic/scottyjs/releases
Scotty.js requires S3 and CloudFront operation authority. Regions are also heard for the first time.

If you add 
  1. --spa
, it will be in web application mode, and index.html will be loaded when there is no access destination file.
Scotty.js is JavaScript open source software (MIT License).


No comments:

Post a Comment

Post Bottom Ad