Skip to content

Commit 9f7917e

Browse files
authored
chore: add demo to readme
1 parent 7bc4d50 commit 9f7917e

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,24 @@
88
Feature Probe is an open source feature management service. This SDK is used to control features in rust programs. This
99
SDK is designed primarily for use in multi-user systems such as web servers and applications.
1010

11-
## Getting started
11+
## Try Out Demo Code
12+
13+
We provide a runnable demo code for you to understand how FeatureProbe SDK is used.
14+
15+
1. Start FeatureProbe Service with docker composer. [How to](https://github.com/FeatureProbe/FeatureProbe#1-starting-featureprobe-service-with-docker-compose)
16+
2. Download this repo and run the demo program:
17+
```bash
18+
git clone https://github.com/FeatureProbe/server-sdk-rust.git
19+
cd server-sdk-rust
20+
cargo run --example demo
21+
```
22+
3. Find the Demo code in [examples](https://github.com/FeatureProbe/server-sdk-rust/tree/main/examples),
23+
do some change and run the program again.
24+
```bash
25+
cargo run --example demo
26+
```
27+
28+
## Step-by-Step Guide
1229

1330
In this guide we explain how to use feature toggles in a Rust application using FeatureProbe.
1431

@@ -83,7 +100,6 @@ let fp = FeatureProbe::new_for_tests(toggles);
83100
assert_eq!(fp.number_value("toggle_2", &u, 20.0), 12.5);
84101
assert_eq!(fp.string_value("toggle_3", &u, "val".to_owned()), "value");
85102
```
86-
[Here is an example](https://github.com/FeatureProbe/server-sdk-rust/tree/main/examples)
87103

88104
## Testing SDK
89105

0 commit comments

Comments
 (0)