koa-websocket
koa-websocket copied to clipboard
wss:// not worked (
trafficstars
const httpsOptions = {
key: fs.readFileSync('keys/server.key'),
cert: fs.readFileSync('keys/server.crt'),
};
const app = websockify(new Koa(), { port: WS_PORT }, httpsOptions);
and if i connect to WS_PORT from WebSocket client via ws://localhost:WS_PORT that's ok, but if I connect via wss://localhost:WS_PORT i get this error:
Connect Error: Error: write EPROTO 4528641472:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:252:
what could it be?