Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else {
throw new UserServiceException({
message: `Unable to find user for id[${id}]`,
})
}
},
})
/**
* Register the thrift plugin.
*
* This will add a Thrift route handler to the '/thrift' path.
* This behaves like any other HTTP route handler, so you can mix and match
* thrift / REST endpoints on the same server instance.
*/
server.register(ThriftServerHapi({
path: '/thrift',
thriftOptions: {
serviceName: '',
handler: serviceProcessor,
},
}), (err: any) => {
if (err) {
throw err
}
})
/**
* Finally, we're ready to start the server.
*/
server.start((err: any) => {
if (err) {