O'Reilly logo

JavaScript Cloud Native Development Cookbook by John Gilbert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch3/bff-graphql-crud --path cncb-bff-graphql-crud
  1. Navigate to the cncb-bff-graphql-crud directory with cd cncb-bff-graphql-crud.
  1. Review the file named serverless.yml with the following content:
service: cncb-bff-graphql-crudprovider:  name: aws  runtime: nodejs8.10  iamRoleStatements:    ...functions:  graphql:    handler: handler.graphql    events:      - http:          path: graphql          method: post          cors: true    environment:      TABLE_NAME:        Ref: Table  graphiql:    handler: handler.graphiql    ...  trigger:    handler: handler.trigger    events:      - stream:          type: dynamodb          ...resources:  Resources:    Table: Type: AWS::DynamoDB::Table ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required