@climatehub/cdk-constructs
TypeScript icon, indicating that this package has built-in type declarations

1.0.15 • Public • Published

What is this?

Stores cdk constructs useful in constructing our services.

Installation

npm install @climatehub/cdk-constructs

Example Usage

import {SingleLambdaBackedRestApi} from '@climatehub/cdk-constructs';

const restApi = new SingleLambdaBackedRestApi(this, 'rest-api', {
  restApiName: `${props.domain}-rest-api`,
  handler: apiHandlerLambda,
  corsEnabled: true,
  loggingOptions: {
    accessLoggingEnabled: true,
    dataTraceEnabled: true,
    metricsEnabled: true,
    tracingEnabled: true,
  },
  resources: new Map<string, string[]>([
    ['/help/contact', ['POST']],
    ['/account', ['GET', 'POST']],
    ['/login', ['POST']],
    ['/logout', ['POST']],
    ['/company', ['POST']],
    ['/investor', ['POST']],
    ['/company/profile/{profileId}', ['PUT']],
    ['/investor/profile/{profileId}', ['PUT']],
    ['/company/account/{accountId}/profile/{profileId}', ['GET']],
    ['/investor/account/{accountId}/profile/{profileId}', ['GET']],
    ['/feedPost', ['POST', 'PUT', 'DELETE']],
    ['/feedPost/{feedPostId}/likedStatus', ['POST']],
    ['/feedPost/{feedPostId}/comment', ['POST', 'PUT', 'DELETE']],
    ['/feedPosts', ['GET']],
    ['/query/companies', ['POST']],
    ['/query/investors', ['POST']]
  ])
});

Readme

Keywords

none

Package Sidebar

Install

npm i @climatehub/cdk-constructs

Weekly Downloads

1

Version

1.0.15

License

ISC

Unpacked Size

20.3 kB

Total Files

21

Last publish

Collaborators

  • climatehub