NodeJS uses https, and Mobile client does not recognize SSL certificates

  node.js, question

The code is as follows:

var options = {
 key: fs.readFileSync('../ssl/private.key','utf8'),
 cert: fs.readFileSync('../ssl/certificate.crt','utf8')
 };
 
 http.createServer(app).listen(3000);
 https.createServer(options, app).listen(3001);

On the computer side, the certificate can be recognized normally, but when it comes to Mobile client, the certificate will be invalid. It feels like a problem with the certificate chain, but NodeJs does not know how to set up the certificate chain.
May I know how everyone did it?

Seeing that several people are concerned about this problem, it seems that there are not a few people who have this problem. It is mainly caused by official documents. This is how the express official documents are written. Therefore, everyone is at a loss when confronted with this problem.
In fact, the problem is very simple. There is a problem with the certificate chain. In other words, there is a lack of CA. Then add the configuration of ca to connect
The final code is as follows:

var options = {
 key: fs.readFileSync('../ssl/private.key','utf8'),
 cert: fs.readFileSync('../ssl/certificate.crt','utf8'),
 ca: fs.readFileSync('../ssl/ca_bundle.crt','utf8')
 };
 
 http.createServer(app).listen(3000);
 https.createServer(options, app).listen(3001);

In this way, our web application will no longer be unable to open in Mobile client.