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
| import type { AWS } from '@serverless/typescript'; | |
| import { App, Stack, Fn } from 'aws-cdk-lib'; | |
| // import { CfnApiMapping } from 'aws-cdk-lib/aws-apigatewayv2' | |
| import { Certificate } from 'aws-cdk-lib/aws-certificatemanager' | |
| import { ApiMapping, DomainName, HttpApi, HttpStage } from '@aws-cdk/aws-apigatewayv2-alpha'; | |
| const app = new App(); | |
| class MyStack extends Stack { | |
| constructor(scope, id) { | |
| super(scope, id); |
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
| import { DynamoDB } from 'aws-sdk'; | |
| import { ref } from './intrinsic'; | |
| import cloudformationResources, { MyTable } from './resources'; | |
| export default { | |
| handler:'create.main', | |
| environment: { | |
| TABLE_NAME: ref(cloudformationResources, MyTable) | |
| }, |
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
| import { | |
| CloudFormationResource, | |
| CloudFormationResources, | |
| } from 'serverless/aws'; | |
| import { findKey } from 'lodash'; | |
| interface CloudFormationReference { | |
| Ref: string; | |
| } |
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
| import { DynamoDB } from 'aws-sdk'; | |
| export default { | |
| handler:'create.main', | |
| environment: { | |
| TABLE_NAME: { | |
| Ref: 'MyTable' | |
| } | |
| }, | |
| events: [ |
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
| export { default as hello } from './hello'; | |
| export { default as goodbye } from './goodbye'; |
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
| export default { | |
| hello: { | |
| handler: 'index.hello' | |
| }, | |
| goodbye: { | |
| handler: 'index.goodbye' | |
| } | |
| }; |
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
| hello: | |
| handler: index.hello | |
| goodbye: | |
| handler: index.goodbye |
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
| service: myServerlessService | |
| provider: | |
| name: aws | |
| runtime: nodejs12.x | |
| functions: | |
| hello: | |
| handler: index.hello | |
| goodbye: |
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
| AWSTemplateFormatVersion: 2010-09-09 | |
| Resources: | |
| S3Bucket: | |
| Type: AWS::S3::Bucket | |
| Properties: | |
| AccessControl: PublicRead | |
| WebsiteConfiguration: | |
| IndexDocument: index.html | |
| ErrorDocument: error.html | |
| DeletionPolicy: Retain |
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
| namespace App\EventListener; | |
| use App\Entity\Counting; | |
| use App\Entity\User; | |
| use Doctrine\ORM\Event\PrePersistEventArgs; | |
| use Symfony\Component\Security\Core\Security; | |
| class CountingEventListener | |
| { | |
| /** |
NewerOlder