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