This is an example of using module tls
in NodeJS to create a client securely connecting to a TLS server.
It is a modified version from documentation about TLS, in which:
- The server is a simple echo one. Clients connect to it, get the same thing back if they send anything to the server.
- The server is a TLS-based server.
- Clients somehow get the server's public key and use it to work securely with the server