Permalink
Browse files

polish

  • Loading branch information...
oberstet committed Mar 27, 2017
1 parent 4d6f80f commit 5df2aae600bb07762f1d9e9516ed13e86f83358d
Showing with 29 additions and 6 deletions.
  1. +5 −2 .crossbar/config.json
  2. +1 −0 .gitignore
  3. +5 −2 Makefile
  4. +17 −1 README.md
  5. +1 −1 package.json
View
@@ -5,7 +5,7 @@
"type": "router",
"realms": [
{
- "name": "realm1",
+ "name": "crossbardemo",
"roles": [
{
"name": "anonymous",
@@ -58,12 +58,15 @@
"port": 8080
},
"rawsocket": {
+ "serializers": [
+ "cbor", "msgpack", "ubjson", "json"
+ ]
},
"websocket": {
"ws": {
"type": "websocket",
"serializers": [
- "cbor", "msgpack", "json"
+ "cbor", "msgpack", "ubjson", "json"
],
"options": {
"compression": {
View
@@ -1,3 +1,4 @@
+node-v*-linux-x64/
.sconsign.dblite
*.sublime-workspace
build
View
@@ -46,11 +46,14 @@ copy_browser: build_browser
publish_npm:
npm publish
+crossbar:
+ crossbar start
+
test:
npm test
test_connect:
nodeunit test/test_connect.js
-test_msgpack_serialization:
- nodeunit test/test_msgpack_serialization.js
+test_serialization_cbor:
+ nodeunit test/test_serialization_cbor.js
View
@@ -95,13 +95,29 @@ AutobahnJS is available via the Node package manager [here](https://www.npmjs.or
#### NodeJS and ws version
+AutobahnJS works with both v1 and v2 of the ws library, and you should use the ws version depending on the NodeJS version you use.
+
+If you run NodeJS v4.5.0 or later, you can use the ws library v2:
+
+```console
+npm install ws@2`
+```
+
+If you run an earlier version of NodeJS, use must use the ws library v1:
+
+```console
+npm install ws@1`
+```
+
+**Details**
+
AutobahnJS currently strives for support of NodeJS v4.2.6 or later. The reason is that this is the version that currently ships with Ubuntu 16.04 LTS.
On NodeJS, we need the [ws library](https://github.com/websockets/ws/) for WebSocket support, as different from browsers, NodeJS does not come with a native implementation.
However, the ws library v2 or later is incompatible with NodeJS earlier than v4.5.0. See [here](http://stackoverflow.com/a/42331959/884770) and [here](https://github.com/websockets/ws/issues/989).
-Rather than dropping support for NodeJS v4 (and hence for the system NodeJS version of Ubuntu), we use ws v1 for time being.
+Rather than dropping support for NodeJS v4 (and hence for the system NodeJS version of Ubuntu), we use ws v1 as a dependency in `package.json`, but allow any version of ws to be used.
## More information
View
@@ -17,7 +17,7 @@
"cbor": ">= 3.0.0",
"tweetnacl": ">= 0.14.3",
"when": ">= 3.7.7",
- "ws": "< 2.0.0"
+ "ws": ">= 1.1.4"
},
"optionalDependencies": {
"bufferutil": ">= 1.2.1",

0 comments on commit 5df2aae

Please sign in to comment.