Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 995 Bytes

File metadata and controls

24 lines (16 loc) · 995 Bytes

https-wss-server-to-server-example

Repo to proove two web servers can communicate over http and websocket when both are running SSL using the same certificate files.

image

Setup

The certificate files in ./ssl_certs were created for localhost using mkcert.
To use them you just need to follow the steps in that README.md to install mkcert as a certificate authority on your machine locally. It's bascially just brew install mkcert and then mkcert -install.

Or you can drop in your own certificate files in ./ssl_certs

Running

In two separate terminals, run node app-server/server.js to start the app server and node dev-server/server.js to run the dev server.

Then visit https://localhost:8001 and you should see sending ping,pong for the https requests and wss message: "wss ping" for the websocket messages.