Sean Wu | Matt Herich | Nisa Champagne | Eleasah Halsmer | |
---|---|---|---|---|
Patrick Gordon | Desiree Morris | Judy Ghashim | Diane Myers | |
---|---|---|---|---|
-
Install dependencies, AWS CLI (
https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
) and Serverlessnpm i -g server less
- Create an
.env
file in root directory. - Set
AWS_PROFILE
to the aws profile that you want to use for deployment (should be in.aws/credentials
). - Set
REACT_APP_STAGE
, should only contain text and dashes. - Set
PUBLIC_URL
to be the stage name wrapped in slashes. Format here is important and required for assets to be loaded properly in the built index.html file. - Your
.env
file should now closely match.env.sample
- Create an
-
Create a secrets.js for Google BigQuery stuff
const bigQueryCredentials = { type: "service_account", project_id: "", private_key_id: "", private_key: "", client_email: "", client_id: "", auth_uri: "", token_uri: "", auth_provider_x509_cert_url: "", client_x509_cert_url: "" } module.exports = bigQueryCredentials
-
Use the command
yarn build:deploy
to deploy onto AWS. You should now be able to see all your functions on AWS. Make sure your region is set to North Virginia
This project was bootstrapped with Create React App.
We are using the implicit grant user authentication flow provided by the Auth0 Single Page App SDK (https://auth0.com/docs/libraries/auth0-spa-js). Notice the files auth0-wrapper.js
and auth_config.js
. This is where the Auth0 client is initialized and the domain/clientId are stored.
You are able to access user information and logged in status with the useAuth0()
custom hook which is defined in the wrapper.
Example: const { user, loggedIn } = useAuth0()
No testing as of yet, but there is a example test in the test folder
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
Builds a dev environment. The backend will depend on what your serverless.yml has specified. The frontend will go to http://localhost:3000
Builds the react app with properly configured react router basename and auth0 redirect URI. Make sure your aws credentials are added and the .env
file is properly configured.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify