This gist demonstrated the example use of serving secured WebSocket server (wss://) using Python's websockets via Nginx and PM2 the process manager. Have not tested thoroughly on production, so this is only for development use.
- For
fullchain.pemandprivkey.pem, you will need usecerbotto generate them. - For
pm2.json, runpm2 start pm2.jsonto run the WebSocket server in the background.