Skip to content

Commit

Permalink
Add concurrently for start script
Browse files Browse the repository at this point in the history
  • Loading branch information
Burke Holland authored and Burke Holland committed Sep 11, 2017
1 parent 5a23a13 commit 70d8adf
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 11 deletions.
106 changes: 102 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -5,18 +5,19 @@
"dependencies": {
"body-parser": "^1.17.2",
"cookie-parser": "^1.4.3",
"debug": "~2.6.3",
"express": "^4.15.3",
"jade": "^1.11.0",
"morgan": "^1.8.2",
"debug": "~2.6.3",
"react": "^15.6.1",
"react-dom": "^15.6.1"
},
"devDependencies": {
"react-scripts": "1.0.10"
"react-scripts": "1.0.10",
"concurrently": "^3.5.0"
},
"scripts": {
"start": "react-scripts start",
"start": "concurrently \"react-scripts start\" \"node server/server.js\"",
"build": "react-scripts build && mv build server",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
Expand Down
7 changes: 3 additions & 4 deletions src/App.js
Expand Up @@ -3,16 +3,15 @@ import logo from './logo.svg';
import './App.css';

class App extends Component {

constructor() {
super();
this.state = { message: '' }
this.state = { message: '' };
}

componentDidMount() {
fetch('/api/message')
.then(response => response.json())
.then(json => this.setState({ message: json }));
.then(response => response.json())
.then(json => this.setState({ message: json }));
}

render() {
Expand Down

0 comments on commit 70d8adf

Please sign in to comment.