Coder Social home page Coder Social 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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactnd-contacts-complete's Issues

installing prop-types manually appears to destroy react-scripts

After manually installing prop-types as instructed the react-scripts folder appears to be one of many node modules removed automatically by npm for some reason.

So when npm start is ran from command line, the react-scripts gives an error as it cannot be found.

Failed to compile: `./src/index.js` [Solved]

8:36-39 "export 'default' (imported as 'App') was not found in './App'

Anyone experience this issue? I'm trying to do the files manually as they are being shown in the commits, but when I run the server i'm getting this error! Please help!

this is my app.js file:

import React, { Component } from 'react';

class App extends Component {
  render() {
    return (
      <div>
        Hello World
      </div>
    )
  }
}

This is my index.js file:

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();

src/App.js: Failed to compile Unexpected use of 'history' no-restricted-globals

The history prop passed into the render function then used to history.push("/") appears to break due to history being a restricted global keyword. Unfortunately //eslint-disable-next-line before history.push() does not fix the problem. Calling onCreateContact will then complain "TypeError: history.push is not a function."

I'm using Firefox Developer Edition 59.0b3 on Linux.

failed to compile

I've got 2 errors when i give the command npm start.

Line 8: 'state' is not defined no-undef
Line 16: 'removeContact' is not defined no-undef

Is there something else needed?

Failed to compile ./src/App.js

Hi!

I have problem with run this project on my local server.
I have this errors:

Line 8: 'state' is not defined no-undef
Line 16: 'removeContact' is not defined no-undef

Could you fix this, please.

API server at 5001 not working

I'm at nanodegree program of react and when I cloned the project, it started, but the API server is not working. The console shows http://localhost:5001/contacts net::ERR_CONNECTION_REFUSED.

I run the npm install and npm start, am I forgetting something?

The images aren't exist in the project files

For the sake of building the Contacts App from scratch to follow the lessons. I noticed that the images don't exist.

Can you upload the images? This is going to make it MUCH easier for fellow students to work with the project!

Missing CSS for add-contact link in index.css

In lesson 5, <a className="add-contact"... and <Link className="add-contact"... were introduced, but the styles to position this element next to the input field are missing, so the icon is showing up collapsed below the input.

Adding height: 63px; position: absolute; top: 0; right: 0; to line 111 of index.css fixes the issue.

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.