Skip to content

AbdelrahmanTolba/Udagram-app-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Udagram Api App

This project is part of the Udacity FullStack JavaScript nanodegree. The code was given as a starter project and the task was to employ and adapt the code to get it working and hosted on AWS

Build with

Getting Started

  1. Clone the repository
$ git clone https://github.com/AbdelrahmanTolba/Udagram-app-deploy.git
  1. Navigate to repository directory
$ cd Udagram-app-deploy
  1. Install dependencies
$ npm install

Deploy on local

Server side

  1. Navigate to udagram-api folder
$ cd udagram/udagram-api
  1. Create .env file
    PORT=8080

    POSTGRES_HOST="127.0.0.1"
    POSTGRES_USERNAME = "abdelrahmantolba"
    POSTGRES_PASSWORD= "password123"
    POSTGRES_DB= "udagram"

    URL= "http://localhost:8080"
    JWT_SECRET="mysecretstring"
  1. Create user and database has same name from env file

  2. build project

$ npm run build
  1. run server project
$ npm run dev

Client side

  1. Install dependencies
$ npm install
  1. build project
$ npm run build
  1. run server project
$ npm run start

Deploy on AWS

AWS services needed for running the application:

  • RDS - In AWS, provision a publicly available RDS database running Postgres
  • S3 - In AWS, provision a s3 bucket for hosting the uploaded files.
  • EB - Container for services

Running App

running application