How to make socket.io support both http and https

this is my code

const Koa=require("koa");
const http=require("http");
const https=require("https");
const app=new Koa();
const fs = require("fs");
const enforceHttps = require("koa-sslify");

const config = require("./config");
const options = {
    key: fs.readFileSync("./XXXXXXXXX.key"),  //ssl
    cert: fs.readFileSync("./XXXXXXXXX.cer")  //ssl
};
const https_server = https.Server(options, app.callback());
const http_server = http.Server(app.callback());

//socket io
const io = require("socket.io")(https_server,{pingTimeout: 30000});

//http https
app.use(enforceHttps({redirectMethods:["GET"]}));
app.use(bodyparser());

io.attach(http_server);

http_server.listen(config.debug?3000:80);
https_server.listen(config.debug?3002:443);

I would like to ask you how to make the normal get and post and socket.io in node compatible with http and https requests!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43f95-44a7a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43f95-44a7a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?