nats://demo.nats.io:4222
, to specify a specific server host and port to connect to.demo.nats.io:4222
or just demo.nats.io
. In the later example the default port 4222 will be used. Check with your specific client library's documentation to see what URL formats are supported.