I am facing a problem with client side https requests.
A snippet can look like this:
var fs = require(\'fs\');
var https = require(\'https\');
var o
From your question I'm guessing you are doing this in development as you are using a self signed certificate for SSL communication.
If that's the case, add NODE_TLS_REJECT_UNAUTHORIZED='0' as an environment variable wherever you are running node or running node directly with NODE_TLS_REJECT_UNAUTHORIZED='0' node app.js
This instructs Node to allow untrusted certificates (untrusted = not verified by a certificate authority)
If you don't want to set an environment variable or need to do this for multiple applications npm has a configuration you can set using the command npm config set strict-ssl=false
I would not recommend setting this environment variable in production. Use a free SSL cert from a trusted provider like letsencrypt.org