Skip to content

Instantly share code, notes, and snippets.

View fwertz's full-sized avatar

Francis Wertz fwertz

View GitHub Profile
@fwertz
fwertz / app.js
Created May 23, 2016 20:22
Basic load balancing NodeJS (Nginx + PM2 + Express)
import express from 'express';
// ... So much space for unstable dependency imports ...
let app = express();
// ... Insert your own routing magic ...
export default app;
@fwertz
fwertz / loadSavedDesignService.js
Last active December 15, 2015 19:03
Sample AWS Lambda Service Handlers
var AWS = require( 'aws-sdk' ),
env = process.env;
var db = new AWS.DynamoDB({
accessKeyId: env.ACCESS_KEY_ID,
secretAccessKey: env.SECRET_ACCESS_KEY
});
module.exports = {
@fwertz
fwertz / server.js
Last active November 11, 2015 06:06
Sample express.js routing
var express = require( 'express' ),
body = require( 'body-parser' ),
env = process.env;
App = express();
/**
* Load up the App.locals as a reference carrying singleton superstar
*/
App.locals = {