diff --git a/packages/server/packages/play-node-go/package.json b/packages/server/packages/play-node-go/package.json index 391611b..6b60eac 100644 --- a/packages/server/packages/play-node-go/package.json +++ b/packages/server/packages/play-node-go/package.json @@ -13,11 +13,14 @@ "socket.io-client": "^2.3.0" }, "scripts": { - "start": "react-scripts start", + "start": "REACT_APP_ENVIRONMENT='development' react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", - "flow": "flow" + "flow": "flow", + + "predeploy": "REACT_APP_ENVIRONMENT=production npm run build" + }, "eslintConfig": { "extends": "react-app" diff --git a/packages/server/packages/play-node-go/server/bin/www b/packages/server/packages/play-node-go/server/bin/www index 0a437c1..ec05bde 100755 --- a/packages/server/packages/play-node-go/server/bin/www +++ b/packages/server/packages/play-node-go/server/bin/www @@ -12,7 +12,7 @@ var http = require('http'); * Get port from environment and store in Express. */ -var port = normalizePort(process.env.PORT || '3000'); +var port = normalizePort(process.env.PORT || '8000'); app.set('port', port); /** diff --git a/packages/server/packages/play-node-go/src/App.js b/packages/server/packages/play-node-go/src/App.js index 739ff0f..241ed97 100644 --- a/packages/server/packages/play-node-go/src/App.js +++ b/packages/server/packages/play-node-go/src/App.js @@ -1,10 +1,14 @@ import React from 'react'; import './App.scss'; +import config from './config'; function App() { + let fetchData = {}; + fetch(config.apiAddress).then(res => {console.log(res);fetchData = res.body}).then(() => console.log(fetchData)) return (