Git Product home page Git Product logo

reactnd-contacts-complete's Introduction

Prerequisite

A Backend API should be up and running. Note the serving URL.

Deploy the Frontend App

  1. Have your Frontend UI code point to the Backend API URL.
cd reactnd-contacts-complete

Open the src/utils/ContactsAPI.js file, and update the const api URL. See an exmaple below:

// Before
const api = process.env.REACT_APP_CONTACTS_API_URL || 'http://localhost:4000'
// After
const api = process.env.REACT_APP_CONTACTS_API_URL || 'http://reactnd-contacts-server-dev.us-east-1.elasticbeanstalk.com'

Use http (not https) and do not add any trailing slash (/) at the end of URL.

  1. Generate the artifacts to deploy:
rm -rf node_modules
rm -f package-lock.json
npm install
# Generate the new artifacts
npm run build

The build script will generate a /build/ directory in the current directory.

  1. Optional - Deploy the UI code to S3 using the AWS CLI.
# List the buckets
aws s3 ls
# Assuming the bucket name is: myawsbucket-751397240855

Synchronize the content of the build folder into the S3 bucket.

# Change the bucket name as applicable to you
aws s3 cp --recursive --acl public-read ./build s3://myawsbucket-751397240855/

Navigate to the URL of your S3 bucket to ensure the deployments worked and that the website is healthy.

Archival Note

This repository is deprecated; therefore, we are going to archive it. However, learners will be able to fork it to their personal Github account but cannot submit PRs to this repository. If you have any issues or suggestions to make, feel free to:

reactnd-contacts-complete's People

Contributors

richardkalehoff avatar sudkul avatar veronikabenkeser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.