Skip to content

Instantly share code, notes, and snippets.

@krp
krp / gist:86ca9849493c3cf2809fce6ea0e2e925
Created June 20, 2018 06:24
Load environment variables from .env file (zshrc)
function loadenv {
echo "Loading contents of .env file as environment variables."
for i in $(cat .env); do
export $i
echo "exported $i"
done
}
@krp
krp / S3-Static-Sites.md
Created February 19, 2018 19:18 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources