Table of Contents
In this project it's required to take a newly developed Full-Stack application built for a retailer and deploy it to a cloud service provider so that it is available to customers.
By Taking a developed full stack application and deploying it to a cloud service provider so that it is available to customers. This application contains the main components of a 3-tier full stack application (UI, API, and Database).
AWS Infrastructure Description
- Typescript
- Node.js
- Epress framework
- Angular
- postgreSQL
- AWS
- Circle-CI
This project require some prequesites and dependenscies to be installed, you can find the instructions below
To get a local copy, follow these simple steps :
-
Clone the repo
git clone https://github.com/abdrahmansoltan/Hosting-a-Full-Stack-Application.git
-
go to project folder
cd Hosting-a-Full-Stack-Application
-
install dependenscies
npm run frontend:install npm run backend:install
-
create databases
-
connect to the default postgres database as the server's root user
psql -U postgres
-
In psql run the following to create a user
CREATE USER project_user WITH PASSWORD 'password123';
-
In psql run the following to create the dev database
CREATE DATABASE udagram;
-
Connect to the databases and grant all privileges
\c udagram; GRANT ALL PRIVILEGES ON DATABASE udagram TO project_user;
-
-
Enviromental Variables Set up
- Here are the environmental variables that needs to be set in a .env file. This is the default setting that I used for development, but you can change it to what works for you.
POSTGRES_HOST="localhost" DB_PORT=5432 PORT=8080 POSTGRES_USERNAME= "postgres" POSTGRES_PASSHORD= "12345" RDS_DIALECT="postgres" POSTGRES_DB="udagram" AWS_REGION="" AWS_PROFILE="" AWS_BUCKET="" URL="http://localhost" AWS_ACCESS_KEY_ID="" AWS_SECRET_ACCESS_KEY="" JWT_SECRET="hello-from-other-side"
-
Run development server
cd udagram-api npm run dev
-
or: Run frontend server
cd udagram-frontend npm start
- Server runs on port
8080
- Database on port
5432
App is running globally on http://abdelrahmansoltan8568954.s3-website-us-east-1.amazonaws.com/
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request