Skip to content

Instantly share code, notes, and snippets.

View mlkirkpatrick's full-sized avatar

Michael Kirkpatrick mlkirkpatrick

View GitHub Profile
(function(){
'use strict';
let app = angular.module('googleTagManager', ['angularLoad']);
const gtmId = 'GTM-AAAAAAA'
const gtmAuth = 'abcd1234'
const gtmEnvId = 'env-1'
function addGTM(doc) {
const api = new apigateway.RestApi(this, 'ApiGateway', {
restApiName: props.stackName,
description: 'My API',
endpointExportName: `${props.stackName}-api-url`,
deployOptions: {
stageName: props.stage,
},
defaultCorsPreflightOptions: {
allowOrigins: ['*'],
allowCredentials: false,
import apigateway = require('@aws-cdk/aws-apigateway')
export interface IHierarchicalRestApiResourcesProps {
readonly api: apigateway.RestApi
readonly resources?: IHierarchicalResourceProps[]
readonly rootMethods?: IHierarchicalMethodProps[]
}
export interface IHierarchicalResourceProps {
readonly pathPart: string
new HierarchicalRestApiResources({
api: api,
resources: [
{
pathPart: 'collections',
methods: [
{
httpMethod: 'GET',
integration: new apigateway.LambdaIntegration(collectionsGetLambda),
},