GithubHelp home page GithubHelp logo

rajasekhar92127 / demo-amplify-base Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mavi888/demo-amplify-base

0.0 0.0 0.0 597 KB

used in my amplify / appsync presentations

JavaScript 69.08% CSS 8.56% HTML 22.36%

demo-amplify-base's Introduction

Steps for building this application with Amplify

  1. Clone the repo

  2. Install amplify in your computer and configure it (https://docs.amplify.aws/start/getting-started/installation/q/integration/react)

  3. Install this app in your computer

$ npm install
  1. Run this app
$ npm start
  1. Initalize this app with amplify. Follow the steps in the console.
$ amplify init
  1. Add authentication - create a default configuration with username
$ amplify add auth
  1. Push the changes to the cloud
$ amplify push
  1. Create the front-end for the authentication
$ cp base/App-01.js src/App.js
$ cp base/App-01.css src/App.css
$ cp base/index-01.html public/index.html
  1. After the changes were pushed to the cloud you can test your app and create an account.

  2. Add an GraphQL API with Cognito User pools as auth. Pick that you dont have an annotated graphql schema and that you want help with the schema creation.

$ amplify add api

Copy this schema in the schema.graphql file that pops up.

type Note @model @auth(rules: [{allow: owner}]) {
	id: ID!
	note: String!
}
  1. Then push the changes to the cloud. Accept all the defaults and continue.
$ amplify push
  1. Modify the frontend to have the api.
$ cp base/App-02.js src/App.js
  1. When the changes are all in the cloud test your page.

  2. If you want to add search. You can go and modify your graphql schema.

type Note @model @auth(rules: [{allow: owner}]) @searchable {
	id: ID!
	note: String!
}

and then push the changes to the cloud

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.