Skip to content

Commit c08d058

Browse files
authored
Describe client libs examples in README.md (#6)
1 parent 7d2966c commit c08d058

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,54 @@
1-
# vacuum-analytics
2-
client libs for elasticsearch/logstash
1+
# Vacuum Analytics
2+
A lightweight logging solution based on elasticsearch/logstash.
3+
4+
# Client libraries
5+
6+
## Javascript library
7+
8+
JavaScript library is designed to be used both in ```node``` and in browser apps.
9+
10+
### Node logging
11+
12+
Add dependncy into your app's package.json file:
13+
```
14+
"dependencies": {
15+
"va": "file:<path_to_repo>/js/library",
16+
}
17+
```
18+
19+
and then import library class into your app.js file:
20+
21+
```
22+
const LogEvent = require('va').LogEvent;
23+
```
24+
25+
See [example](https://github.com/sourcerer-io/vacuum-analytics/tree/master/js/samples/node) for how-to.
26+
27+
### In-browser logging
28+
29+
Copy ```<path_to_repo>/js/library``` and then include the script into your web app:
30+
31+
```
32+
<script src='js/library/LogEvent.js'</script>
33+
```
34+
35+
Refer to [example](https://github.com/sourcerer-io/vacuum-analytics/tree/master/js/samples/browser) for complete steps.
36+
37+
## Kotlin library
38+
39+
### Prerequirements
40+
* Install [Java SE](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
41+
* Install [gradle](https://gradle.org/install/)
42+
43+
### Build
44+
45+
To build the [libarary](https://github.com/sourcerer-io/vacuum-analytics/tree/master/kotlin/libarary) and its [example](https://github.com/sourcerer-io/vacuum-analytics/tree/master/kotlin/sample):
46+
47+
```
48+
cd kotlin && gradle build;
49+
```
50+
51+
You can run the example by:
52+
```
53+
cd sample && gradle run;
54+
```

0 commit comments

Comments
 (0)