Having trouble connecting to the server with Node.js, Nginx, SSL, and Cloudflare?
Here is an issue I encountered: when attempting to send a request from a web Flutter application to a Node.js server, I encountered the following error: [error image link](https://i.sstatic.net/YVudEBx7.png).

Moreover, when I visit [techproguide.store](https://techproguide.store), I face another issue as shown in this image: [image link](https://i.sstatic.net/pBhrPGkf.png).

To address these issues, I generated a certificate on Cloudflare and integrated it. I then proceeded to send requests from the client to the server, depicted in this image: [image link](https://i.sstatic.net/02EMVTCY.png).

For reference, below is a snippet of my server-side code: [code image link](https://i.sstatic.net/JflMEfD2.png)

javascript
const express = require('express';
const mysql = require('mysql';
const cors = require('cors';
const https = require('https';
const socketIo = require('socket.io';
const bcrypt = require('bcrypt';
const { v4: uuidv4 } = require('uuid';
const crypto = require('crypto';
const bodyParser = require('body-parser';
const fs = require('fs';
const nodemailer = require('nodemailer';

const multer = require('multer';
const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, 'uploads/';
},
filename: (req, file, cb) => {
cb(null, file.originalname);
},
});
const upload = multer({ storage });

const app = express();
const server = https.createServer({
key: fs.readFileSync(path.join(__dirname, 'cert', 'key.pem'),
cert: fs.readFileSync(path.join(__dirname, 'cert', 'cert.pem'),
}, app);
const io = socketIserver);

const port = 8443;

Picture