Whatever your Nerves project does, there’s a good chance that it can be enhanced by securely connecting to a Phoenix Server in the cloud; it gives you the ability to can monitor and control your device from afar.
Websockets are a great medium for this connection. The can be a bit fiddly to set up though - except not any more. I’ve extracted a couple of hexicles from my projects to make things easier for you (and future me):