This project was bootstrapped with Create React App for the front-end and serverless-webpack for the back-end.
-
run
npm installon theback_end/folder to install dependencies. -
run
npm startto start the api proxy on the port 4000. -
run
npm installon thefront_end/folder to install dependencies. -
run
npm startto start the React development server in the port 3000.
Note: AWS credentials must be set up in advace, if in doubt, go to this link.
-
run
npm run deployon theback_end/folder - take note of the endpoint in the result (something likehttps://kjdhshjkds7681.execute-api.eu-west-2.amazonaws.com/staging). -
edit config.json file in
front_end/srcand replace the "add-me-before-deployment" with the enpoint obtained in the last point. -
run
npm run deployon thefront_end/folder. Take note of theStaticSiteS3BucketWebsiteURLresult after running this command, that is the link to the webapp!
- run
npm run deployon theback_end/folder to deploy changes to the api. - run
npm run deployon thefront_end/folder to deploy changes to the webapp (no changes to the config.json file are needed).
- run
npm run removeon theback_end/folder to remove the api. - run
npm run removeon thefront_end/folder to remove the webapp.
Thanks for reading!