blob: 4f31c315afeab57f7c032e348fe2639155a84fc2 [file] [log] [blame] [view]
Simon Hürlimann (CyT)d7323212015-03-30 12:37:48 +02001License
2-------
3Licensed to the Apache Software Foundation (ASF) under one
4or more contributor license agreements. See the NOTICE file
5distributed with this work for additional information
6regarding copyright ownership. The ASF licenses this file
7to you under the Apache License, Version 2.0 (the
8"License"); you may not use this file except in compliance
9with the License. You may obtain a copy of the License at
T Jake Luciani0c124bb2011-01-08 03:49:16 +000010
Simon Hürlimann (CyT)d7323212015-03-30 12:37:48 +020011 http://www.apache.org/licenses/LICENSE-2.0
T Jake Luciani0c124bb2011-01-08 03:49:16 +000012
Simon Hürlimann (CyT)d7323212015-03-30 12:37:48 +020013Unless required by applicable law or agreed to in writing,
14software distributed under the License is distributed on an
15"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16KIND, either express or implied. See the License for the
17specific language governing permissions and limitations
18under the License.
T Jake Luciani0c124bb2011-01-08 03:49:16 +000019
Simon Hürlimann (CyT)d7323212015-03-30 12:37:48 +020020## Running the user example
T Jake Luciani0c124bb2011-01-08 03:49:16 +000021
Simon Hürlimann (CyT)d7323212015-03-30 12:37:48 +020022Generate the bindings:
Henrique Mendonçaa9e62482013-09-20 16:47:02 +020023
Simon Hürlimann (CyT)d7323212015-03-30 12:37:48 +020024 ../../../compiler/cpp/thrift --gen js:node user.thrift
25 ../../../compiler/cpp/thrift --gen js:node --gen py hello.thrift
26
27To run the user example, first start up the server in one terminal:
28
29 NODE_PATH=../lib:../lib/thrift node server.js
30
31Now run the client:
32
33 NODE_PATH=../lib:../lib/thrift node client.js
34
35For an example using JavaScript in the browser to connect to
36a node.js server look at hello.html, hello.js and hello.thrift
37
38HTTP examples are provided also: httpClient.js and httpServer.js
39You can test HTTP cross platform with the httpServer.py Python server