Project setup

Introduction

This is a project made for the BS3221 Developing for the Cloud Module. This document presents instructions for setting up this project on your own AWS account.

This will require you to install the amplify cli. Instructions for how to do this are available at https://docs.amplify.aws/javascript/tools/cli/start/set-up-cli/.

Forking the existing github repository

run the command amplify init --app https://github.com/benwright9400/dev-for-cloud.git and follow the flow of the program. An item will appear asking if you want to carry over the secrets value, please say yes.

Then run the command 'amplify pull backend'.

Secrets

Then run the command 'amplify push'. The console should prompt you for a value for the secret dbString.

Navigate to https://www.mongodb.com/atlas and create or sign into an account. You will then be able to create a database instance and produce a connection string for the Node.js Driver.

Please also ensure that allow from anywhere is added to the list of acceptable networks which can access the DB. This can be found through security -> network on the mongodb atlas console.

This db connection string must be added as a secret for both of the lambda functions with the name of dbString.

Finally, run amplify push again to be certain.

Install node packages

Run npm i in the root directory of the folder to ensure that the dependencies for the front end have been installed.

Run the frontend locally

Run npm start to run the application locally.