GithubHelp home page GithubHelp logo

beta's Introduction

SG Tennis Beta v1

SG Tennis Beta v1

SG Tennis Beta v1 is developed and tested on macOS.
If something doesn’t work, please file an issue.

Get Started Immediately

To run this project, you need to first configure amplify and push the resources in this project to your environment to your aws environment.

Amplify Setup

Configuring Amplify (Connecting to your environment).

Step 1: In your project root, run these commands.

npm install -g @aws-amplify/cli
amplify configure
amplify init

Follow the instructions, enter your AWS console credentials and select an existing environment or configure a new environment. If you wish to use an existing environment, contact the administrators of this project to obtain the AWS credentials.

Step 2:

In your project root, run these commands.

amplify status
amplify push

amplify status displays the amplify updates to deploy to your AWS backend. amplify push updates the backend with the lambda, apis, storage and other aws meta information in this repository. After you have run amplify push,copy the just the json contents of src\aws-exports.js and paste it into server\config\aws-exports.js. Just the json contents, do not modify the module.exports{} declaration.

If you wish to use an existing an existing table in your dynamodb, ensure that the tableName in your lambda function matches your existing tables.

Dev Setup

Running the project locally

Run npm install in your beta, beta/server and beta/amplify/backend/function/[name]function directories. In your project root, after installing the dependencies, run this command.

npm run dev

This starts up your client and your express server on your machine on port 3000 and port 5000 respectively.

Miscellaneous

Other important notes

To secure the endpoints in this server, we make use of a library called jsonwebtoken. To verify a user access to protected routes, we utilise symmetric key encryption.

Our local express server will encrypt the user id using a secret key after the user id has been deserialize by passport to generate an authorization token. The lambda function will receive this token and verify this token using the same secret key.

For security purposes, it is critical that you replace all instances of dangerousDummySecretKey in the project with your actual secret key prior to production deployment. Detailed comments are included to suggest solutions and alternatives to store the secret keys.

Made with lots of ❤️ and ☕ by Ziyi

beta's People

Contributors

alterz01 avatar robertqin86 avatar ziyiliu02 avatar

Watchers

 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.