Go to file
2023-11-02 14:27:11 +03:00
.github Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
src Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
.gitignore Fix build. Bump dependencies. (#5) 2018-08-15 15:32:21 +03:00
.npmrc Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
.prettierignore Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
.prettierrc Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
LICENSE Let's make it opensource (#9) 2019-11-25 13:35:36 +03:00
package-lock.json Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
package.json Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
README.md Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00
vite.config.js Add vite config. Add prettier (#7) 2023-11-02 14:27:11 +03:00

Woody js

Browser-Compatible Node.js Thrift Binary Protocol Connection

Installation

npm install @vality/woody

Usage Example

import connectClient from '@vality/woody';

const host = 'localhost';
const port = '8080';
const path = '/some/path';

// Generated Thrift client
const genClient = {
    /* ... your thrift client ... */
};

// Connection options
const connectOptions = {
    https: true,
    // ... other options ...
};

// Error callback
const errorCb = (err) => {
    console.error('An error occurred:', err);
};

// Create a client connection
const client = connectClient(host, port, path, genClient, connectOptions, errorCb);

// Now you can use 'client' to interact with Thrift service