Skip to content

Instantly share code, notes, and snippets.

View wgrisa's full-sized avatar

William Grisa wgrisa

View GitHub Profile
@wgrisa
wgrisa / beanstalk deploy script
Created October 30, 2018 18:42
beanstalk deploy prepared (but not only) for gitlab ci
#!/bin/bash
# EB_APP_NAME = application name
# EB_APP_ENV = application environment
# S3_BUCKET = S3 bucket for ElasticBeanstalk
# S3_KEY = S3 folder to upload built app
# Zip up everything with the exception of node_modules (including dist), .git and zip files
ts=`date +%s`
fn="$EB_APP_NAME-$ts.zip"
const sendgridClient = require('@sendgrid/client')
const sendEmail = (message, res) => {
sendgridClient.setApiKey(process.env.SENDGRID_KEY)
const request = {
method: 'POST',
url: '/v3/mail/send',
body: message,
}
{
"arrowParens": "always",
"printWidth": 120,
"singleQuote": true,
"trailingComma": "all",
"semi": false
}