(Assuming the local machine has nodejs and npm installed)
- Open a terminal/cmd and navigate inside the fovus-challenge folder
- Install all the required packages by using the command
npm i
- After successfully installing the package, to start the reactJS use the command
npm run start
. The reactJS application will open up in the default browser.
- Open a terminal/cmd and navigate to the utils folder.
- To use AWS CDK, the system also needs AWS CLI configured with the AWS credentials configured to access the AWS account.
- Assuming AWS CLI is installed, (you can refer this to link to install AWS CLI for your operating system - AWS CLI: getting-started-install) use the command
aws configure
to set your AWS credentials such as AWS Access Key ID, AWS Secret Access Key, Default region name. Please remember to use an IAM user which has corresponding access to provision all the resources used in this project.(I used a root user's credentials to configure my AWS CLI). - Install the neccesary node modules dependencies inside the lambda and organizer folder using the command
npm i
inside the respective folders. - To install AWS CDK, use the command
npm install aws-cdk-lib
. - Use the command
cdk boostrap
to create a link between the AWS CLI and AWS CDK. - Use the command
cdk synth
to execute the code and translate it into AWS CloudFormation template. - Use the command
cdk deploy
to deploy the above translated code to the AWS platform. - After successfully deploying the changes, the terminal/cmd will give the API Gateway endpoint. Please note this and paste it in the .env file.
Please create a file as .env (you can take the file: /fovus-challenge/src/.env.copy as reference and fill the values)
- REACT_APP_ACCESS_KEY_ID= Get this from AWS IAM (I used root's)
- REACT_APP_SECRET_ACCESS_KEY= Get this from AWS IAM (I used root's)
- REACT_APP_API_GATEWAY_ENDPOINT= You will get this when deployig the CDK
- REACT_APP_METHOD= you will see this in CDK (I have made it as 'send')