devalang_wasm/tools/cli/config/
urls.rs

1#![cfg(feature = "cli")]
2
3use std::env;
4
5/// Get the SSO URL from environment or use default
6pub fn get_sso_url() -> String {
7    env::var("DEVALANG_SSO_URL").unwrap_or_else(|_| "http://127.0.0.1:5174".to_string())
8}
9
10/// Get the API URL from environment or use default
11pub fn get_api_url() -> String {
12    env::var("DEVALANG_API_URL").unwrap_or_else(|_| "https://api.devalang.com".to_string())
13}
14
15/// Get the CDN URL from environment or use default
16pub fn get_cdn_url() -> String {
17    env::var("DEVALANG_CDN_URL").unwrap_or_else(|_| "https://cdn.devalang.com".to_string())
18}
19
20/// Get the Forge URL from environment or use default
21pub fn get_forge_url() -> String {
22    env::var("DEVALANG_FORGE_URL").unwrap_or_else(|_| "https://forge.devalang.com".to_string())
23}