You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{NestedStack}from'aws-cdk-lib';import{typeConstruct}from'constructs';import{Code,Function,Runtime}from'aws-cdk-lib/aws-lambda';import{SubnetType,typeVpc}from'aws-cdk-lib/aws-ec2';import{LambdaIntegration,RestApi}from'aws-cdk-lib/aws-apigateway';importpathfrom'path';import{RetentionDays}from'aws-cdk-lib/aws-logs';exportclassServerStackextendsNestedStack{readonlyrestApi: RestApi;constructor(scope: Construct,vpc: Vpc){super(scope,ServerStack.name);consthandler=newFunction(this,Function.name,{
vpc,vpcSubnets: {subnetType: SubnetType.PRIVATE_ISOLATED},code: Code.fromDockerBuild(path.resolve(`../../`),{imagePath: '/usr/local/sofash',}),handler: 'apps/server/dist/lambda.handler',runtime: Runtime.NODEJS_18_X,logRetention: RetentionDays.ONE_WEEK,environment: {NODE_ENV: 'PROD',DB_HOST: 'xxx',DB_USERNAME: 'xxx',DB_PASSWORD: 'xxx',MQ_HOST: 'xxx',TG_BOT_TOKEN: 'xxx',TG_BOT_WEBHOOK_URL: 'xxx',},});constintegration=newLambdaIntegration(handler);// TODO remove stage name from generated URL// (it is optional only with a custom domain)// TODO replace with HttpApi since it is cheapierthis.restApi=newRestApi(this,RestApi.name);this.restApi.root.addProxy({anyMethod: true,defaultIntegration: integration,});}}
The text was updated successfully, but these errors were encountered:
https://api.github.com/vorant94/sofash/blob/fcb3ff714b19baf963f745027eebdd11e63af32c/apps/infra/src/app/server.stack.ts#L39
The text was updated successfully, but these errors were encountered: