How to create https server and support wss use koa2? I need it very much.
See original GitHub issuehttp + https =
const Koa = require('koa');
const app = new Koa();
http.createServer(app.callback()).listen(80);
const options = {
key: fs.readFileSync('./ssl/private.pem', 'utf8'),
cert: fs.readFileSync('./ssl/20180303.crt', 'utf8')
};
https.createServer(options, app.callback()).listen(443);
http + ws =
const Koa = require('koa');
const websockify = require('koa-websocket');
const app = websockify(new Koa());
app.listen(80);
https + wss = ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:18
- Comments:5
Top Results From Across the Web
Implementing https: and wss: support in Express ... - Medium
And here we go, we have a https server! Try it from your browser or Postman. If you wish to switch back to...
Read more >How to create an https server? - Node.js
To create an HTTPS server, you need two things: an SSL certificate, and built-in https Node.js module. We need to start out with...
Read more >Koa 本地搭建HTTPS 环境 - 牛さんの部落格
... a self-signed certificate Node.js Documentation - HTTPS How to create https server and support wss use koa2? I need it very much....
Read more >node.js - How to Create Secure(TLS/SSL) Websocket Server
Currently I'm running ws server. Now I want to secure this connection by using secure connections i.e by implementing wss protocol and also...
Read more >Setup secure connections (TLS/WSS/HTTPS) with certificate
WSS — For WebSocket transport between Brekeke SIP Server and Browser. If you use webRTC feature, this secure connection is needed. HTTPS –...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you can do it this way:
In anyway, you can perfectly stick with HTTP on the Koa side and use a reverse-proxy (nginx, httpd) to enable HTTPS — I think most people use Koa this way (at least I use Koa this way).