Skip to content

Commit 3f3c8fa

Browse files
committed
feat: added definition to env. config
1 parent 7cc1d7b commit 3f3c8fa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.env-example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ NATS_URL='nats://localhost:4222'
44
AQUILA_URL='http://localhost:8080'
55
WITH_HEALTH_SERVICE=false
66
GRPC_HOST='127.0.0.1'
7-
GRPC_PORT=50051
7+
GRPC_PORT=50051
8+
DEFINITIONS='./definitions'

taurus/src/config/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ pub struct Config {
2626
pub grpc_host: String,
2727

2828
pub grpc_port: u16,
29+
30+
pub definitions: String,
2931
}
3032

3133
/// Implementation for all relevant `Aquila` startup configurations
@@ -36,12 +38,13 @@ impl Config {
3638
pub fn new() -> Self {
3739
Config {
3840
environment: env_with_default("ENVIRONMENT", Environment::Development),
39-
mode: env_with_default("MODE", Mode::STATIC),
41+
mode: env_with_default("MODE", Mode::DYNAMIC),
4042
nats_url: env_with_default("NATS_URL", String::from("nats://localhost:4222")),
4143
aquila_url: env_with_default("AQUILA_URL", String::from("http://localhost:50051")),
4244
with_health_service: env_with_default("WITH_HEALTH_SERVICE", false),
4345
grpc_host: env_with_default("GRPC_HOST", "127.0.0.1".to_string()),
4446
grpc_port: env_with_default("GRPC_PORT", 50051),
47+
definitions: env_with_default("DEFINITIONS", String::from("./definitions")),
4548
}
4649
}
4750
}

0 commit comments

Comments
 (0)