Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit a766b97

Browse files
author
Rizchel Dayao
committed
Update react-scripts
1 parent 36a01e8 commit a766b97

File tree

12 files changed

+27
-55
lines changed

12 files changed

+27
-55
lines changed

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "react-app"
3+
}

.eslintrc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

README1.md

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In this Code Pattern, we will deploy a React application using Kubernetes.
44

55
There are many choices when looking for the right solution to manage and deploy our applications. It can often be overwhelming when we're trying to pick the right solution. One of our many choices is Kubernetes. This pattern will take you through how to get a front end application deployed on Kubernetes. After implementing the code, you will have the knowledge to deploy your own applications on Kubernetes.
66

7-
This repository uses the React JavaScript library to build out the front end of the application. Redux is a predictable state container used hand in hand with React. The OMDb API is called to get movie information based on user input. It handles all of the state management within the application. Docker is an open source tool that is used to package the application into a container. IBM Cloud provides one to use with Kubernetes deployments called IBM Cloud Container Service. Kubernetes handles the management and deployment of the containerized application.
7+
This repository uses the React JavaScript library to build out the front end of the application. Redux is a predictable state container used hand in hand with React. It handles all of the state management within the application. The OMDb API is called to get movie information based on user input. Docker is an open source tool that is used to package the application into a container. IBM Cloud provides one to use with Kubernetes deployments called IBM Cloud Container Service. Kubernetes handles the management and deployment of the containerized application.
88

99
When the reader has completed this Code Pattern, they will understand how to:
1010
* Containerize a React application using Docker
@@ -30,7 +30,6 @@ When the reader has completed this Code Pattern, they will understand how to:
3030
# Watch the video
3131

3232
# Steps
33-
Use the ``Deploy to IBM Cloud`` button **OR** run locally.
3433

3534
## Prerequisites
3635
1. You must get an API key from [OMDb API](http://www.omdbapi.com/) in order to get a response from the API. You will insert your API key in /src/actions/index.js on line 42
@@ -40,19 +39,7 @@ Use the ``Deploy to IBM Cloud`` button **OR** run locally.
4039
$ export docker_username="YOUR_DOCKER_USERNAME"
4140
```
4241

43-
## Deploy to IBM Cloud
44-
[![Deploy to IBM Cloud](https://metrics-tracker.mybluemix.net/stats/527357940ca5e1027fbf945add3b15c4/button.svg)](https://bluemix.net/deploy?repository=https://github.com/IBM/watson-banking-chatbot.git)
45-
46-
1. Press the above ``Deploy to IBM Cloud`` button and then click on ``Deploy``.
47-
48-
<!--optional step-->
49-
2. In Toolchains, click on Delivery Pipeline to watch while the app is deployed. Once deployed, the app can be viewed by clicking 'View app'.
50-
![](doc/source/images/toolchain-pipeline.png)
51-
52-
5342
## Run locally
54-
> NOTE: These steps are only needed when running locally instead of using the ``Deploy to IBM Cloud`` button.
55-
5643
1. [Clone the repo](#1-clone-the-repo)
5744
2. [Run the application](#2-run-the-application)
5845

@@ -65,7 +52,6 @@ $ git clone https://github.com/rizcheldayao/react-redux-api-example.git
6552
```
6653

6754
### 2. Run the application
68-
6955
1. Install [Node.js](https://nodejs.org/en/)
7056
2. Run the following commands in a terminal:
7157

@@ -129,29 +115,6 @@ You can now access the application at http://localhost:3000
129115

130116
<img width="1415" alt="screen shot 2017-03-13 at 6 14 10 pm" src="https://cloud.githubusercontent.com/assets/18426780/23879083/fa0df756-0818-11e7-8569-469367b84280.png">
131117

132-
133-
# Privacy Notice
134-
If using the `Deploy to IBM Cloud` button some metrics are tracked, the following
135-
information is sent to a [Deployment Tracker](https://github.com/IBM/cf-deployment-tracker-service) service
136-
on each deployment:
137-
138-
* Node.js package version
139-
* Node.js repository URL
140-
* Application Name (`application_name`)
141-
* Application GUID (`application_id`)
142-
* Application instance index number (`instance_index`)
143-
* Space ID (`space_id`)
144-
* Application Version (`application_version`)
145-
* Application URIs (`application_uris`)
146-
* Labels of bound services
147-
* Number of instances for each bound service and associated plan information
148-
149-
This data is collected from the `package.json` file in the sample application and the `VCAP_APPLICATION` and `VCAP_SERVICES` environment variables in IBM Cloud and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Cloud to measure the usefulness of our examples, so that we can continuously improve the content we offer to you. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.
150-
151-
## Disabling Deployment Tracking
152-
153-
To disable tracking, simply remove ``require("cf-deployment-tracker-client").track();`` from the ``app.js`` file in the top level directory.
154-
155118
# Links
156119
* [Demo on Youtube](https://www.youtube.com/watch?v=Jxi7U7VOMYg)
157120
* [Blog post](https://medium.com/@rizchel.a.dayao/my-journey-to-deploying-my-first-react-application-with-kubernetes-95e6d25f434d)

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
"devDependencies": {
77
"enzyme": "^2.4.1",
88
"eslint": "^2.0.0-rc.1",
9-
"eslint-config-airbnb": "^14.1.0",
10-
"eslint-plugin-react": "^6.10.0",
119
"node-sass": "^4.5.0",
12-
"react-addons-test-utils": "^15.3.0",
13-
"react-scripts": "^0.6.0",
10+
"react-scripts": "^1.1.1",
1411
"redux-logger": "^2.8.1",
1512
"redux-router": "^2.1.2",
1613
"redux-thunk": "^2.2.0",

public/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<head>
1818
<meta charset="utf-8">
1919
<meta name="viewport" content="width=device-width, initial-scale=1">
20-
<link rel="shortcut icon" href="">
2120
<title>Movie Finder</title>
2221
</head>
2322
<body>

src/components/Input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ You may obtain a copy of the License at
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
import React, { Component, PropTypes } from 'react'
16-
import '../style/main.css';
15+
import React, { Component } from 'react'
16+
import PropTypes from 'prop-types'
1717

1818
class Input extends Component {
1919
constructor (props) {

src/components/ListItem.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ You may obtain a copy of the License at
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
import React, { PropTypes, Component } from 'react'
15+
import React, { Component } from 'react'
16+
import PropTypes from 'prop-types'
1617

1718
class ListItem extends Component {
1819
render() {

src/containers/App.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ You may obtain a copy of the License at
1515
import React, { Component } from 'react'
1616
import List from './List'
1717
import InputSet from './InputSet'
18+
import '../style/main.css';
1819

1920
class App extends Component {
2021

src/containers/InputSet.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ You may obtain a copy of the License at
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
import React, { Component, PropTypes } from 'react'
15+
import React, { Component } from 'react'
16+
import PropTypes from 'prop-types'
1617
import { connect } from 'react-redux'
1718
import Input from '../components/Input'
1819
import * as MoviesAction from '../actions'

0 commit comments

Comments
 (0)