Node.js + Express - Can't connect. ERR_CONNECTION_REFUSED
Your problem is that the tutorial you're following is very old. Express generator has changed it's structure immensely over time. It now utilizes npm
to run the initial app commands, as you should. The scripts object in package.json
is extremely handy for abstracting commands.
Simply cd
into your example app and run:
npm start
You'll see the following in your terminal:
$ npm start
> [email protected] start /Users/your-user/example
> node ./bin/www
and enjoy!
The rest of that tutorial aside from setting it up is still pretty accurate though. I'd consult the docs above anything to be honest. Just my opinion though.
Lastly "I noticed it pointed to the wrong path for Node on my system, so I changed it to the correct one". You should change that back or it might fail.