This is the example code from the "Embedding a NATS Server" episode of Rethink Connectivity. To run this code, you'll need a Synadia Cloud account, and credentials called leafnode.creds in this directory.
go run main.go
Slides can be found at this link: https://link.excalidraw.com/p/readonly/5GaQ6xoYuzlYIUT0gkXU