thrift-typescript icon indicating copy to clipboard operation
thrift-typescript copied to clipboard

code in README for express server setup issues errors

Open Choongkyu opened this issue 4 years ago • 1 comments

The code in the README:

app.use(
    '/thrift',
    bodyParser.raw(),
    ThriftServerExpress(Calculator.Processor, serviceHandlers),
)

issues this error:

const serviceHandlers: Calculator.IHandler<express.Request<ParamsDictionary, any, any, QueryString.ParsedQs, Record<string, any>>>
Expected 1 arguments, but got 2.ts(2554)

Also import * as express from 'express' should be import express from 'express', otherwise an error is issued.

Choongkyu avatar Jan 23 '21 20:01 Choongkyu

I've got the same error. It seems that the code in the readme is not up-to-date. You look here to find you answers https://github.com/creditkarma/thrift-server/tree/master/packages/thrift-server-express

Ivan-Parushev avatar Jun 14 '21 15:06 Ivan-Parushev