Skip to content

Instantly share code, notes, and snippets.

View dionimercado's full-sized avatar
😀
Working on my future

Dioni Mercado dionimercado

😀
Working on my future
View GitHub Profile
// load the AWS SDK
const AWS = require('aws-sdk')
// load CloudFront key pair from environment variables
// Important: when storing your CloudFront private key as an environment variable string,
// you'll need to replace all line breaks with \n, like this:
// CF_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIE...1Ar\nwLW...2eL\nFOu...k2E\n-----END RSA PRIVATE KEY-----"
const cloudfrontAccessKeyId = process.env.CF_ACCESS_KEY_ID
const cloudFrontPrivateKey = process.env.CF_PRIVATE_KEY
const signer = new AWS.CloudFront.Signer(cloudfrontAccessKeyId, cloudFrontPrivateKey)
@kocisov
kocisov / next_nginx.md
Last active July 6, 2024 17:42
How to setup next.js app on nginx with letsencrypt