- Node v14.15.1 (LTS) or more recent. While older versions can work it is advisable to keep node to latest LTS version
- npm 6.14.8 (LTS) or more recent, Yarn can work but was not tested for this project
- AWS CLI v2, v1 can work but was not tested for this project
Provision the necessary AWS services needed for running the application:
- In AWS, provision a publicly available RDS database running Postgres.
- In AWS, provision a s3 bucket for hosting the uploaded files.
- Export the ENV variables needed or use a package like dotnev/.
- From the root of the repo, navigate udagram-api folder
udagram-api
to install the node_modulesnpm install
. After installation is done start the api in dev mode withnpm run dev
. - Without closing the terminal in step 1, navigate to the udagram-frontend
udagram-frontend
to intall the node_modulesnpm install
. After installation is done start the api in dev mode withnpm run start
.
This project contains two different test suite: unit tests and End-To-End tests(e2e). Follow these steps to run the tests.
cd udagram-frontend
npm run test
npm run e2e
There are no Unit test on the back-end
Unit tests are using the Jasmine Framework.
The e2e tests are using Protractor and Jasmine.
- Angular - Single Page Application Framework
- Node - Javascript Runtime
- Express - Javascript API Framework
-
After building the frontend for production using
build-production
script,The frontend deployment is done by the provided scriptdeploy
-
After building the backend for production using
build
script,The backend deployment is done by the provided scriptdeploy
- Preparing the environment by installing node,Aws CLI and EB CLI
- building the app with the following sequance >
- installing frontend dependencies > installing backend dependencies > building frontend > building
- Deploying frontend to S3
- Deploying backend to EB
- Setting environment variables
Frontend:http://udacity-udagram-frontend.s3-website.us-east-2.amazonaws.com/
Backend:http://udagram-backend-dev.eba-pdbs4k3r.us-east-2.elasticbeanstalk.com/
Database:database-1.cfzgaby01nq4.us-east-2.rds.amazonaws.com