How to use the @creditkarma/thrift-server-express.ThriftServerExpress function in @creditkarma/thrift-server-express

To help you get started, we’ve selected a few @creditkarma/thrift-server-express examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kevinbgreene / thrift-tutorial / src / content / server.ts View on Github external
title: post.title,
                        body: post.body,
                    })
                })
            } else {
                throw new ContentServiceException({
                    message: `Unable to find post for id[${id}]`,
                })
            }
        },
    }

    app.use(
        serverConfig.path,
        bodyParser.raw(),
        ThriftServerExpress({
            serviceName: 'content-service',
            handler: new ContentService.Processor(serviceHandler),
        }),
    )

    app.listen(serverConfig.port, () => {
        console.log(`Thrift server listening at http://${serverConfig.hostName}:${serverConfig.port}`)
    })
}())

@creditkarma/thrift-server-express

Express server middleware for the Apache Thrift protocol

Apache-2.0
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis