Skip to content

Commit

Permalink
move streaming sdk to Setup in Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuecklers committed Nov 9, 2016
1 parent ec68a0d commit cd14358
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ You can also include it from our CDN-Provider `fastly`.

The Baqend SDK provides a global `DB` variable by default.


Baqend Streaming SDK
--------------------

If you want to use the realtime streaming queries, you have to either use `baqend-streaming.js` or
`baqend-streaming.min.js` for production.

In Addition, you can include [Rx.js](https://github.com/ReactiveX/rxjs) v5 into your project, for many advanced
Observable features.
You can use the unpkg CDN:

```html
<script type="text/javascript" src="//unpkg.com/@reactivex/[email protected]/dist/global/Rx.js"></script>
<!-- include the SDK after rxjs -->
<script type="text/javascript" src="//www.baqend.com/js-sdk/latest/baqend-streaming.js"></script>
```

The SDK is shipped with the core-js Observable shim per default.
If you include Rx.js globally, it will be detected and used by the SDK automatically.
You can also set the Observable implementation which the SDK will use,
by setting the `require('baqend/streaming').Observable = Observable` afterwards.

Initialize
----------

Expand Down Expand Up @@ -60,26 +82,6 @@ DB.ready(function() {
</script>
```

Baqend Streaming SDK

If you want to use the realtime streaming queries, you have to either use `baqend-streaming.js` or
`baqend-streaming.min.js` for production.

In Addition, you can include [Rx.js](https://github.com/ReactiveX/rxjs) v5 into your project, for many advanced
Observable features.
You can use the unpkg CDN:

```html
<script type="text/javascript" src="//unpkg.com/@reactivex/[email protected]/dist/global/Rx.js"></script>
<!-- include the SDK after rxjs -->
<script type="text/javascript" src="//www.baqend.com/js-sdk/latest/baqend-streaming.js"></script>
```

The SDK is shipped with the core-js Observable shim per default.
If you include Rx.js globally, it will be detected and used by the SDK automatically.
You can also set the Observable implementation which the SDK will use,
by setting the `require('baqend/streaming').Observable = Observable` afterwards.


Usage in Node.js
----------------
Expand Down

0 comments on commit cd14358

Please sign in to comment.