Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active April 10, 2024 16:40
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

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
@loopiezlol
loopiezlol / git-lambda.js
Created April 10, 2018 14:12
flow showing off how to clone, update and push to a git repo from an AWS lambda function
const fs = require('fs')
const path = require('path')
const process = require('process')
const { spawnSync } = require('child_process')
const { GITHUB_TOKEN, GITHUB_USERNAME, GITHUB_EMAIL } = process.env
// leaving this without https:// in order to reuse it when adding the remote
const gitRepositoryURL = 'github.com/owner/repo-name.git'
const repositoryName = 'repo-name'
@developit
developit / *valoo.md
Last active November 13, 2023 08:39
🐻 Valoo: just the bare necessities of state management. 150b / 120b. https://npm.im/valoo

🐻 valoo

just the bare necessities of state management.

Usage

Hotlink it from https://unpkg.com/valoo.

See Interactive Codepen Demo.