Nodejs Unable to Verify Leaf Signature
Developing locally I use self signed certificates. Node will error with the following message unable to verify the first certificate with code UNABLE_TO_VERIFY_LEAF_SIGNATURE
the solution is to set:
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
However, since its only for local development and its a security risk, I prefer to set the environmental var when launching the node script:
$ NODE_TLS_REJECT_UNAUTHORIZED=0 node ./server.js