Skip to content

Instantly share code, notes, and snippets.

View gregorypierce's full-sized avatar

Gregory Pierce gregorypierce

  • Georgia
View GitHub Profile
this.certificate = new acm.Certificate( this, "certificate", {
domainName: props.domainName,
subjectAlternativeNames: props.alternativeDomainNames,
validation: acm.CertificateValidation.fromDns( this.hostedZone )
});
this.certificate = new acm.DnsValidatedCertificate( this, "certificate", {
domainName: props.domainName,
hostedZone: this.hostedZone,
subjectAlternativeNames: props.alternativeDomainNames,
validationMethod: acm.ValidationMethod.DNS
});
// setup the alias record that will point to this API
//
new route53.ARecord( this, "domain_alias_record", {
recordName: props.subdomainPrefix + "." + props.domainName,
zone: props.hostedZone,
target: route53.RecordTarget.fromAlias(new route53Targets.ApiGateway(this.api))
});
console.log("API: "+ props.name);
console.log("DomainName: " + props.subdomainPrefix + "." + props.domainName );
// add the custom domain for this api. Must be listed in the certificate
//
const domain = new apigw.DomainName( this, "api_domain_name", {
domainName: props.subdomainPrefix + "." + props.domainName,
securityPolicy: apigw.SecurityPolicy.TLS_1_2,
certificate: props.certificate,
endpointType: apigw.EndpointType.EDGE
});
var basePath = props.basePath != undefined? props.basePath : props.name;
this.api.addDomainName( "domain_name", {
domainName: props.domainName,
securityPolicy: apigw.SecurityPolicy.TLS_1_2,
certificate: props.certificate
});
// create the API that the Lamnda function will be attached for
// setup as a regional api
//
this.api = new apigw.RestApi( this, "spec_restapi", {
restApiName: props.name,
deploy: true,
deployOptions: {
stageName: props.stageName,
tracingEnabled: true,
},
public readonly api: apigw.RestApi;
exports.placeSearch = function( options )
{
parameters = {
location : [ options.lat, options.lon ],
types: options.placeType
}
googlePlaces.placeSearch(
parameters,
function( error, response )
attributes: {
device: {
model: 'device',
},
geolocation: {
index: '2d',
longitude: {
type: 'float',
angular.module('app', ['ui.compat'])
.config(['$stateProvider', function ($stateProvider) {
var home = {
name: 'home',
url: '/',
templateUrl: 'content.html'
},
red = {
name: 'red',
url: '/red',