use ca certifcate node js

JavaScript
$ export NODE_EXTRA_CA_CERTS=[your CA certificate file path]

Source

Also in JavaScript: