Skip to content

Commit 2ac418c

Browse files
authored
fix: demo
1 parent cb877cd commit 2ac418c

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

examples/demo.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ use url::Url;
77

88
#[tokio::main]
99
async fn main() -> Result<(), FPError> {
10-
let remote_url = url::Url::parse("http://localhost:4007").expect("invalid url");
11-
// Server SDK key in Project List Page.
12-
let server_sdk_key = "server-7fa2f771259cb7235b96433d70b91e99abcf6ff8".to_owned();
13-
14-
let config = FPConfig {
15-
remote_url,
16-
server_sdk_key,
17-
refresh_interval: Duration::from_secs(5),
18-
start_wait: Some(Duration::from_secs(5)),
19-
..Default::default()
20-
};
21-
22-
let fp = FeatureProbe::new(config);
23-
if !fp.initialized() {
24-
println!("FeatureProbe failed to initialize, will return default value");
25-
}
26-
2710
let _ = tracing_subscriber::fmt().init();
2811
// let remote_url = "http://localhost:4009/server"; // for local docker
2912
let remote_url = Url::parse("https://featureprobe.io/server").expect("invalid url");

0 commit comments

Comments
 (0)