GithubHelp home page GithubHelp logo

scalasm / amplify-cdk-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.08 MB

From https://www.youtube.com/watch?v=mSKQlV3lRYw&ab_channel=FooBarServerless

HTML 12.30% CSS 6.65% JavaScript 59.88% TypeScript 21.17%

amplify-cdk-demo's Introduction

Amplify-CDK Demo

This application has been written following the YouTube tutorial from Marcia Villalba.

Things that I had to change

  • the amplify.yml has to stay in the repository root, otherwise the build will succeed in Amplify but nothing will get deployed anyway.

CLI Reminders

Bootstrap amplify for your frontend

npm i @aws-amplify/ui-react aws-amplify bootstrap

Environment variables for local build

Since there environment variables from Amplify are not available when building locally, then we can use this nice trick in the package.json run commands:

env-cmd -f .env.local react-scripts start

Install appsync transformers

npm i @aws-cdk/aws-appsync cdk-appsync-transformer

Generate graphql.schema for frontend

cd frontend/src/graphql
amplify add codegen
? Choose the type of app that you're building javascript  
? What javascript framework are you using react
? Choose the code generation language target javascript
? Enter the file name pattern of graphql queries, mutations and subscriptions **\*.js
? Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions Yes
? Enter maximum statement depth [increase from default if your schema is deeply nested] 2

References

amplify-cdk-demo's People

Watchers

Mario Scalas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.