Based on the following guide: https://ericdraken.com/running-xvfb-on-a-shared-host-without-x/
Using the following docker image: https://hub.docker.com/r/lambci/lambda/
Based on the following guide: https://ericdraken.com/running-xvfb-on-a-shared-host-without-x/
Using the following docker image: https://hub.docker.com/r/lambci/lambda/
/* eslint-env jest */ | |
import _ from 'lodash' | |
import path from 'path' | |
import fs from 'fs' | |
import callsites from 'callsites' | |
import knex from 'knex' | |
import hash from 'object-hash' | |
import conf from '<conf>' | |
// Get the db config. |
This is my typical decorator stack for a 'smart component' used as the component for react-router
route.
Note some code is missing here but this should give you the idea.
Example usage:
StateDetailsScene.js
import React from 'react'
import _ from 'lodash'
import route from 'core/decorators/route'
javascript:(function(){var src="https://gist.githack.com/cpsubrian/90fffb1a826143a59364a449b4c586a6/raw/3a0bf7f8b97ba31d7836843fd24dd66ef4c31707/pinkify.js";document.body.appendChild(document.createElement('script')).setAttribute('src', src);})(); |
// Put credentials in ~/.aws/credentials like: | |
// | |
// [default] | |
// aws_access_key_id = [key] | |
// aws_secret_access_key = [secret] | |
if (process.argv.length !== 5) { | |
console.log('Usage: node ./upload.js [filepath] [bucket] [key]') | |
process.exit() | |
} |
# add git-ignore syntax here of things you don't want copied into docker image | |
.git | |
.data | |
*Dockerfile* | |
*docker-compose* | |
node_modules |
$ node app.js | |
My specific title | |
green | |
undefined |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<meta name="description" content=""> | |
<meta name="author" content=""> |
NPM_TOKEN=[your-npm-authentication-token] | |
YARN_VERSION=0.24.4 |
import request from './request' | |
// Your express app (or router). | |
import app from './app' | |
it('can serve requests', () => { | |
return request | |
.app(app) | |
.post('/foo/bar') | |
.header({authorization: 'Bearer mytoken'}) |