diff --git a/runtime/src/environment.rs b/runtime/src/environment.rs new file mode 100644 index 00000000..a2735a74 --- /dev/null +++ b/runtime/src/environment.rs @@ -0,0 +1,7 @@ +pub fn is_dev() -> bool { + cfg!(debug_assertions) +} + +pub fn is_prod() -> bool { + !is_dev() +} \ No newline at end of file diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index b429dff2..0b057dcc 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1 +1,2 @@ -pub mod encryption; \ No newline at end of file +pub mod encryption; +pub mod environment; \ No newline at end of file diff --git a/runtime/src/main.rs b/runtime/src/main.rs index 97afce06..7c6c84ed 100644 --- a/runtime/src/main.rs +++ b/runtime/src/main.rs @@ -640,14 +640,6 @@ async fn dotnet_ready(_token: APIToken) { } } -pub fn is_dev() -> bool { - cfg!(debug_assertions) -} - -pub fn is_prod() -> bool { - !is_dev() -} - fn get_available_port() -> Option { TcpListener::bind(("127.0.0.1", 0)) .map(|listener| listener.local_addr().unwrap().port())