- Nodejs: version 10.x
- AWS Account and CLI setup
- Serverless Framework For backend
- S3 Bucket for Frontent hosting
- Official: https://nodejs.org/en/download/
- RECOMMENDED - To avoid permission error: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
- Instructions to follow: AWS CLI install
- Or directly for MacOs user: AWS CLI install MacOS
- Instructions to follow: AWS cli configuration
$ aws configure
AWS Access Key ID [None]: your_access_key
AWS Secret Access Key [None]: your_secret_key
Default region name [None]: ap-southeast-1
Default output format [None]:
This command line will create a credentials file at :
~/.aws/credentials
onMac/Linux
C:\Users\USERNAME\.aws\credentials
onWindows
This file will be used by the serverless framework when deploying to AWS.
- Install serverles globally
npm install -g serverless
More Info: https://serverless.com/framework/docs/getting-started/
-
Current project is using this S3 bucket: http://calculator-project.s3-website-ap-southeast-1.amazonaws.com/
-
To install your own S3 Bucket: https://serverless-stack.com/chapters/create-an-s3-bucket.html
- Pre-requisite:
Setup your AWS CLI and credential
from the AWS Setup - cd
backend
- Run serverless deployment cli:
serverless deploy -v
- Pre-requisite:
Setup your AWS CLI and credential
from the AWS Setup - cd
frontend
- npm run build
- Run AWS to S3 Bucket
aws s3 sync build/ s3://calculator-project
Note: calculator-project
should be you bucket name