JakePartusch / serverlessui-advanced-example

An example of using the Serverless UI CDK constructs to deploy a React, GraphQL application with DynamoDB

Home Page:https://advanced-example.serverlessui.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serverless UI Advanced

This repository showcases a complex integration example for Serverless UI

Technologies:

  • Front-end: Snowpack + React + Apollo client
  • Back-end: GraphQL + Apollo Server + DynamoDB
  • Infrastructure: AWS CDK + Serverless UI construct

Serverless UI integration

This repository uses the @serverlessui/construct package to directly integrate existing infrastructure with Serverless UI

const { functions } = new ServerlessUI(this, 'ServerlessUI', {
  buildId: 'advanced-example',
  uiSources: [Source.asset(`${__dirname}/../../build`)],
  apiEntries: [`${__dirname}/../../functions/graphql.ts`],
  apiEnvironment: {
    TABLE_NAME: table.tableName,
  },
  domain: {
    domainName: 'serverlessui.app',
    hostedZone: HostedZone.fromHostedZoneAttributes(this, 'HostedZone', {
      hostedZoneId: 'Z1XXXXXXXXXXXXX',
      zoneName: 'serverlessui.app',
    }),
    certificate: Certificate.fromCertificateArn(
      this,
      'Certificate',
      'arn:aws:acm:us-east-1:xxxxxxxxxx:certificate/xxxxxx-xxxx-xxxx-xxxxxx',
    ),
  },
});

About

An example of using the Serverless UI CDK constructs to deploy a React, GraphQL application with DynamoDB

https://advanced-example.serverlessui.app/

License:MIT License


Languages

Language:TypeScript 91.7%Language:JavaScript 4.7%Language:HTML 2.0%Language:CSS 1.6%