Skip to main content

quorum_lib/
config.rs

1use std::sync::OnceLock;
2
3static SERVER_URL: OnceLock<String> = OnceLock::new();
4
5/// Initializes the SERVER_URL with a hardcoded value.
6pub fn init() {
7    let url = "http://127.0.0.1:3000".to_string();
8
9    SERVER_URL.set(url).expect("Failed to set SERVER_URL");
10}
11
12/// Gets the url of the public SERVER_URL
13///
14/// Currently hardcoded -> Will need updating at later date.
15///
16/// # Returns
17/// A static string slice representing the server URL.
18pub fn get_server_url() -> &'static str {
19    "http://127.0.0.1:3000"
20}