/ThriftJavaJavascriptDemo

A sample project demonstrating how to get Thrift going with a Java server and a Javascript client

Primary LanguageJavaScript

Thrift Java server Javascript client demo

A sample project demonstrating how to get Thrift going with a Java server and a Javascript client

Because it took me half a day to get this going, I thought I'd share my findings.

Requirements

Maven

Thrift binary

This sample project

How to

  • Copy thrift-0.9.2.exe to ThriftJavaJavascriptDemo-master
  • Start Thrift compiler and Java compiler by executing make.bat
  • Run run-server.bat
  • Run run-clients.bat. This opens a browser (-> JS client) and at the same time a Java client.
  • Open project with Eclipse to have a closer look.

Yes, the code can be cleaned up. But it works.

Source

Most files come from some part of the sources of Thrift. For example:

shared.thrift

tutorial.thrift

index.html

Httpd.java

etc.