hvmd 0.1.0

productivity tool for those who need it the most
Documentation
1
2
3
4
5
6
7
8
9
use std::env;

use async_nats::{Client, connect};

pub async fn get_client() -> Result<Client, async_nats::error::Error<async_nats::ConnectErrorKind>>
{
	let nats_url = env::var("NATS_URL").unwrap_or("nats://localhost:4222".to_string());
	connect(nats_url).await
}