Skip to content

Commit f8a4c9a

Browse files
authored
chore: add example in readme
1 parent 130254c commit f8a4c9a

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,25 @@
88
FeatureProbe is an open source feature management service. This SDK is used to control features in JavaScript 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/client-sdk-js.git
19+
cd client-sdk-js
20+
// open example/index.html in browser
21+
```
22+
23+
3. Find the Demo code in [example](https://github.com/FeatureProbe/client-sdk-js/tree/main/example),
24+
do some change and run the program again.
25+
```
26+
// open example/index.html in browser
27+
```
28+
29+
## Step-by-Step Guide
1230

1331
In this guide we explain how to use feature toggles in a JavaScript application using FeatureProbe.
1432

@@ -74,8 +92,6 @@ test("feature probe unit testing", (done) => {
7492
});
7593
```
7694

77-
[Here is an example](https://github.com/FeatureProbe/client-sdk-js/tree/main/example)
78-
7995
## Available options
8096

8197
This SDK takes the following options:
@@ -95,7 +111,7 @@ We have unified integration tests for all our SDKs. Integration test cases are a
95111
be sure to pull submodules first to get the latest integration tests before running tests.
96112

97113
```js
98-
npm run test
114+
npm run test
99115
```
100116

101117
## Contributing

0 commit comments

Comments
 (0)