Headline is quite misleading to the generate part. I expected to see the code that would produce SSL certificate using only nodejs API calls. Like
let properties = {
country: "GE",
organization: "My Company Inc.",
unit: "My Super Authority",
isAuthority: true
}
let csr = await certificatesAPI.produceCSR(privateKey, publicKey, properties);
let x509Cert = await certificatesAPI.signCSRToX509(csr, privateKey, publicKey);