blob: 692379465bc8165120a107a8dd15a4b5a0fe3e58 [file] [log] [blame]
henrique2a7dccc2014-03-07 22:16:51 +01001Thrift Javascript Library
2=========================
3This browser based Apache Thrift implementation supports
4RPC clients using the JSON protocol over Http[s] with XHR.
5
6License
7-------
8Licensed to the Apache Software Foundation (ASF) under one
9or more contributor license agreements. See the NOTICE file
10distributed with this work for additional information
11regarding copyright ownership. The ASF licenses this file
12to you under the Apache License, Version 2.0 (the
13"License"); you may not use this file except in compliance
14with the License. You may obtain a copy of the License at
15
16 http://www.apache.org/licenses/LICENSE-2.0
17
18Unless required by applicable law or agreed to in writing,
19software distributed under the License is distributed on an
20"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21KIND, either express or implied. See the License for the
22specific language governing permissions and limitations
23under the License.
24
25Test Servers
26------------
27drwxr-xr-x 2 randy randy 4096 Feb 8 15:44 sec
28-rw-r--r-- 1 randy randy 2183 Feb 9 04:01 server_http.js
29-rw-r--r-- 1 randy randy 2386 Feb 9 05:39 server_https.js
30
31server_http.js is a Node.js web server which support the
32standard Apache Thrift test suite (thrift/test/ThriftTest.thrift).
33The server supports Apache Thrift XHR and WebSocket clients.
34
35server_https.js is the same but uses SSL/TLS. The sec directory
36contains the server key and certificate used by the ssl server.
37Both of these servers support WebSocket (the http: supports ws:,
38and the https: support wss:).
39
40To run the test servers use: $ make check (requires
41the Apache Thrift Java branch and make check must have
42been run in thrift/lib/java previously) or run the grunt
43 build in the parent js directory (see README there).
44
45Test Clients
46------------
47-rw-r--r-- 1 randy randy 13558 Feb 9 07:18 test-async.js
48-rw-r--r-- 1 randy randy 5724 Feb 9 03:45 test_handler.js
49-rwxr-xr-x 1 randy randy 2719 Feb 9 06:04 test.html
50-rw-r--r-- 1 randy randy 4611 Feb 9 06:05 test-jq.js
51-rwxr-xr-x 1 randy randy 12153 Feb 9 06:04 test.js
52-rw-r--r-- 1 randy randy 2593 Feb 9 06:16 test-nojq.html
53-rw-r--r-- 1 randy randy 1450 Feb 9 06:14 test-nojq.js
54-rw-r--r-- 1 randy randy 2847 Feb 9 06:31 testws.html
55
56There are three html test driver files, all of which are
57QUnit based. test.html test the Apache Thrift jQuery
58generated code (thrift -gen js:jquery). The test-nojq.html
59Runs almost identical tests against normal JavaScript builds
60(thrift -gen js). Both of the previous tests use the XHR
61transport. The testws.html runs similar tests using the
62WebSocket transport. The test*.js files are loaded by the
63html drivers and contain the actualApache Thrift tests.