Scotch.io project to learn React - won't load

reactjs

#1

Hi guys - trying to learn React in the c9 environment. Found a good tutorial on Scotch.io but having trouble running it. I do the following:

git clone https://github.com/searsaw/react-weather-app.git
cd react-weather-app
yarn # or npm install
yarn start # or npm run start

It runs fine but then the “Preview Running Application” button leads to the default site: “No application seems to be running here!”

Any suggestions how to troubleshoot?


#2

i think you need to set the running app address to 0.0.0.0 change port to 80.


#3

Thanks, but how do I practically do that?

It’s served using webpack-dev-server and won’t load on Cloud9. When I run “npm start” on the following:

 "scripts": {
    "serve:webpack": "webpack-dev-server --host 0.0.0.0 --port 80 --hot --inline --content-base ./src",
    "serve:json": "json-server db.json",
    "start": "concurrently \"npm run serve:webpack\" \"npm run serve:json\""
  },

I get a vague error, I can’t seem to figure out:

events.js:160
[0]       throw er; // Unhandled 'error' event
[0]       ^
[0] 
[0] Error: listen EACCES 0.0.0.0:80
[0]     at Object.exports._errnoException (util.js:1020:11)
[0]     at exports._exceptionWithHostPort (util.js:1043:20)
[0]     at Server._listen2 (net.js:1245:19)
[0]     at listen (net.js:1294:10)
[0]     at net.js:1404:9
[0]     at _combinedTickCallback (internal/process/next_tick.js:83:11)
[0]     at process._tickCallback (internal/process/next_tick.js:104:9)
[0]     at Module.runMain (module.js:606:11)
[0]     at run (bootstrap_node.js:389:7)
[0]     at startup (bootstrap_node.js:149:9)
[0]     at bootstrap_node.js:504:3

Any suggestions?