How to run a websocket server on ws and wss at same time that they both communicate or sync data with each other? Or WSS on HTTP and WS on HTTPS?
问题 My requirement is this that if some users connect through WS or WSS they can communicate with each other.Now if i run node server for WSS it does not run over HTTP and if run for WS then it does not Connect on HTTPS .Any solution? 回答1: After a long research at last i find this solution and is working for me as i was requiring.This is my sever.js file. /** Before running: > npm install ws Then: > node server.js > open http://localhost:8080 in the browser */ const http = require('http'); const