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 ...

Get Learning Apache Thrift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.