O'Reilly logo

Learning Apache Thrift by Krzysztof Rakowski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JavaScript

JavaScript is a scripting language used mainly for frontend development in web applications, but it has also gained popularity recently in server-side solutions with Node.js.

JavaScript code generated by the Apache Thrift compiler (Node.js aside) is strictly client-side, intended to be used in the web browser against the services written in other languages.

Generating the code

Apache Thrift's compiler offers few options for JavaScript. Run the following command to see them:

$ thrift --help

Look for the information about JavaScript generators:

  js (Javascript):
    jquery:          Generate jQuery compatible code.
    node:            Generate node.js compatible code.
    ts:              Generate TypeScript definition files.

Running the generator without any options will provide ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required