The client app for this demo is built with React.js and is modifiable to suit your implementation needs. This file contains the instructions for setting up your development environment to work with the serverless backend.
Before you run the client application, you must finish setting up the serverless backend. See Step 4 of the serverless readme for full instructions.
Once you have this value, you'll' need to modify web-ui/src/config.js
to support your installation. Replace the value from this line with the ApiGatewayStageUrl you copied from the stack outputs of the serverless setup.
export const API_URL = "https://<api-gateway-id>.execute-api.<region>.amazonaws.com/<stage-name>"
Important CloudFront information: Given the distributed nature of the CloudFront distribution used in the serverless backend, you may get 404 errors if you try to use it before CloudFront has completed its propagation to all EDGE locations. If you are experiencing errors with the application, wait a least an hour before you try to use the web-ui client on a new stack.
Install the LTS version of the NodeJS server environment into your development environment.
Install the Yarn package manager into your development environment by executing the following command:
npm i yarn
Run yarn install
then yarn start
to start the development server.
Open http://localhost:3000 to view it in the browser.
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.
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/deployment