This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.certificate = new acm.Certificate( this, "certificate", { | |
domainName: props.domainName, | |
subjectAlternativeNames: props.alternativeDomainNames, | |
validation: acm.CertificateValidation.fromDns( this.hostedZone ) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.certificate = new acm.DnsValidatedCertificate( this, "certificate", { | |
domainName: props.domainName, | |
hostedZone: this.hostedZone, | |
subjectAlternativeNames: props.alternativeDomainNames, | |
validationMethod: acm.ValidationMethod.DNS | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.api.addDomainName( "domain_name", { | |
domainName: props.domainName, | |
securityPolicy: apigw.SecurityPolicy.TLS_1_2, | |
certificate: props.certificate | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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, | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public readonly api: apigw.RestApi; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.placeSearch = function( options ) | |
{ | |
parameters = { | |
location : [ options.lat, options.lon ], | |
types: options.placeType | |
} | |
googlePlaces.placeSearch( | |
parameters, | |
function( error, response ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
attributes: { | |
device: { | |
model: 'device', | |
}, | |
geolocation: { | |
index: '2d', | |
longitude: { | |
type: 'float', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app', ['ui.compat']) | |
.config(['$stateProvider', function ($stateProvider) { | |
var home = { | |
name: 'home', | |
url: '/', | |
templateUrl: 'content.html' | |
}, | |
red = { | |
name: 'red', | |
url: '/red', |