You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
234 B
Rust
9 lines
234 B
Rust
4 years ago
|
use std::env;
|
||
|
|
||
|
pub fn mongodb_test_connection_string() -> &'static str {
|
||
|
match env::var("MONGODB_CONNECTION_STRING") {
|
||
|
Ok(value) => Box::leak(value.into_boxed_str()),
|
||
|
Err(_) => "mongodb://localhost:27017",
|
||
|
}
|
||
|
}
|