Skip to content

aws-samples/react-formik-on-aws

Sample React Formik

Requirements

Deployment Instructions

  1. Create a new directory, navigate to that directory in a terminal and clone the GitHub repository:

      git clone https://github.com/aws-samples/react-formik-on-aws
  2. From the command line, use npm to install the development dependencies:

      npm install
  3. From the command line, use npm to build the React website:

      npm run build:ui 
  4. Bundle Lambda function

      npx esbuild resources/lambda/index.js --bundle --platform=node --target=node12 --external:aws-sdk --outfile=dist/lambda/build/index.js
  5. Configure CDK

      cdk bootstrap aws://<ACCOUNT_ID>/<ACCOUNT_REGION>
  6. To deploy from the command line use the following:

      npx cdk deploy

Testing

  1. After deployment, the output shows the API Gateway URL, open the link in the browser.

Cleanup

  1. From the command line, use the following in the source folder
    npx cdk destroy
  2. Confirm the removal and wait for the resource deletion to complete.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • npx cdk deploy deploy this stack to your default AWS account/region
  • npx cdk diff compare deployed stack with current state
  • npx cdk synth emits the synthesized CloudFormation template

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •