stayhardgreen / Mini-Trello

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

graphql-dynamodb-backend and client

Graphql API

Pre-requisites:

python3.8

pip install graphene==2.1.8 Flask==3.0.0 Flask-GraphQL==2.0.0 boto3=1.29.0

Please replace your own AWS region, secret access key, account key id in migrate.py , schema.py

schema.py

access_key_id = 'ACCESS_KEY_ID'
secret_access_key = 'SECRET_ACCESS_KEY'
region_name = "REGION"

migrate.py

access_key_id = 'ACCESS_KEY_ID'
secret_access_key = 'SECRET_ACCESS_KEY'
region_name = "REGION"

Run API

Client

Environment

  • node 18.16.0

Set Graphql API URL

  • You can change Graphql API URL in /client/src/App.js

  • Default value of API_URL is localhost:5000

          const httpLink = new HttpLink({
              uri: "http://API_URL/graphql",
          });
    
          const wsLink = new WebSocketLink({
              uri: "ws://API_URL/graphql",
              options: {
                  reconnect: true,
              },
          });
    

Run

  • cd client
  • yarn install
  • npm run start

About


Languages

Language:JavaScript 67.2%Language:Python 28.5%Language:HTML 3.5%Language:CSS 0.8%