Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.04 KB

README.md

File metadata and controls

37 lines (25 loc) · 1.04 KB

======= Thrift Require.js Example

An example application for showing how to use the Thrift JS modules that are compatible with Require.js.

Thrift Update

To generate Require.js compatible JS modules with thrift, you must apply the following patch to your thrift compiler with:

patch -p1 < thrift_requirejs.patch

Then compile and install Thrift.

Note that this patch only allows Thrift to generate Require.js compatible modules for Thrift enums and constants only.

Generating JS modules with structs and services is still a work in progress.

Generating JS Modules

First clone this git repository. The thrift tutorial files are provided in the thrift directory. To compile follow these steps:

cd thrift

make

The generated JavaScript module will be added to the js/gen-js directory. Then serve the index.html file to see the use of the Thrift enums and constants.