Yoo! Author of that tutorial here... >_>
You will want to have Ganache or Ganache CLI running in the background. Either spin up Ganache and make sure that the port is set to 8545, or run Ganache CLI in a separate terminal window, which defaults to listening on port 8545.
If you do have one of those running and it still doesn't work, then maybe you have a firewall up, or some sort of ip tables configuration? Make sure that you can connect to localhost:8545. You can try to
curl localhost:8545. If you get a
400 Bad Request, you're on the right track. If you get something like
curl: (7) Failed to connect to localhost port 8545: Connection refused, then your Ethereum JSON RPC provider (which in this case is Ganache, but may be a local Geth running with HTTP RPC enabled) is not receiving requests on that port.