dociql process.env.NODE_TLS_REJECT_UNAUTHORIZED=0 1

dociql process.env.NODE_TLS_REJECT_UNAUTHORIZED=0

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; 
or 
export NODE_TLS_REJECT_UNAUTHORIZED = "0";

Here is what the above code is Doing:
1. We are creating a new instance of the WebSocket class.
2. We are passing the URL of the websocket server to the constructor.
3. We are setting up an event listener for the open event.
4. We are setting up an event listener for the message event.
5. We are setting up an event listener for the close event.
6. We are sending a message to the server.
7. We are closing the connection.

Similar Posts