Unable to create instance of IPFS, getting ECONNREFUSED

I have a Windows 2019 Server in Google cloud and am trying to add a file to IPFS programmatically. When I invoke the js code, it seems to choke on the second line of:

const { create } = require (‘ipfs-http-client’);
const ipfs = create(‘http://127.0.0.1:5001’);

…and the error I get is:

FetchError: request to http://127.0.0.1:5001/api/v0/add?stream-channels=true&progress=false failed, reason: connect ECONNREFUSED 127.0.0.1:5001

Windows Defender firewall is disabled on the server OS and port 5001 is open on the vm instance. I am also unable to start the daemon from the command line as I get “The term ipfs is not recognized as a name of a cmdlet, function, script file, or executable program.”
Any help is appreciated!

The web server needs to be listening on the port where you are trying to instantiate IPFS, i.e. 5001.