File tree 3 files changed +12
-16
lines changed
3 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -101,16 +101,4 @@ KeePee.prototype.read = function (key) {
101
101
} ;
102
102
103
103
104
- var kp = new KeePee ( ws ) ;
105
-
106
- var writeOperation = kp . write ( 'Foo' , 'Bar' ) ;
107
-
108
- writeOperation . success ( function ( ) {
109
-
110
- } ) ;
111
-
112
- writeOperation . fail ( function ( ) {
113
-
114
- } ) ;
115
-
116
104
Original file line number Diff line number Diff line change @@ -100,8 +100,11 @@ internals.template = function (host, port) {
100
100
'<script type="application/javascript" src="socket.io.min.js"></script>' +
101
101
'<script type="application/javascript" src="client.js"></script>' +
102
102
'<script language="javascript">' +
103
- 'document.ws = new WebSocket("ws://' + host + ':' + port + '");' +
104
- 'document.ws.onmessage = function (event) { console.log(event.data); };' +
105
- '</script>' +
103
+ 'var socket = io.connect("ws://' + host + ':' + port + '");' +
104
+ 'var ws = new WebSocket("ws://' + host + ':' + port + '");' +
105
+ 'ws.onmessage = function (event) { console.log(event.data); };' +
106
+ 'var kp = new KeePee(socket);' +
107
+ 'var writeOperation = kp.write("Foo", "Bar");' +
108
+ '</script>' +
106
109
'</body></html>' ;
107
110
} ;
Original file line number Diff line number Diff line change 10
10
"timeout" : {
11
11
"server" : 60000
12
12
},
13
- "maxSockets" : 300
13
+ "maxSockets" : 300 ,
14
+ "cors" : {
15
+ "origin" : [
16
+ " *localhost:8080"
17
+ ]
18
+ }
14
19
}
15
20
}
16
21
],
You can’t perform that action at this time.
0 commit comments