Using AWS Linux setup an L2TP/IPSEC Soft Ether VPN
Consider HVM (SSD) EBS-Backed 64-bit m3.medium
-
us-east-1 => ami-1ecae776
-
Updates and dependencies
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install docker git wget
// based on https://github.com/strongloop/loopback/issues/651#issuecomment-259540469 | |
'use strict'; | |
const | |
relationMethodPrefixes = [ | |
'prototype.__findById__', | |
'prototype.__destroyById__', | |
'prototype.__updateById__', | |
'prototype.__exists__', |
Consider HVM (SSD) EBS-Backed 64-bit m3.medium
us-east-1 => ami-1ecae776
Updates and dependencies
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install docker git wget
/** | |
* Based on @ericprieto code https://github.com/strongloop/loopback/issues/651#issuecomment-140879983 | |
* place this file into common/mixins/disableAllMethods.js | |
* | |
**/ | |
module.exports = function(Model, options) { | |
if(Model && Model.sharedClass) { | |
var methodsToExpose = options.expose || []; |
var isoCountries = { | |
'AF' : 'Afghanistan', | |
'AX' : 'Aland Islands', | |
'AL' : 'Albania', | |
'DZ' : 'Algeria', | |
'AS' : 'American Samoa', | |
'AD' : 'Andorra', | |
'AO' : 'Angola', | |
'AI' : 'Anguilla', | |
'AQ' : 'Antarctica', |
var stringify = function(obj, prop) { | |
var placeholder = '____PLACEHOLDER____'; | |
var fns = []; | |
var json = JSON.stringify(obj, function(key, value) { | |
if (typeof value === 'function') { | |
fns.push(value); | |
return placeholder; | |
} | |
return value; | |
}, 2); |
var aws = require('aws-sdk'); | |
aws.config.update({ | |
accessKeyId: 'YOUR_ACCESS_KEY', | |
secretAccessKey: 'YOUR_SECRET_KEY', | |
region: 'us-west-2' | |
}); | |
var ec2 = new aws.EC2(); |
(function(){ | |
var parse = JSON.parse; | |
JSON = { | |
stringify: JSON.stringify, | |
validate: function(str){ | |