Taxum / @taxum/core / service / serviceFn
Function: serviceFn()
serviceFn<
Request
,Response
>(f
):Service
<Request
,Response
>
Defined in: service/service-fn.ts:17
Returns a new ServiceFn with a given closure..
Type Parameters
Request
Request
Response
Response
Parameters
f
ServiceFnClosure
<Request
, Response
>
Returns
Service
<Request
, Response
>
Example
ts
import { serviceFn } from "@taxum/core/service";
const service = serviceFn(
(req) => HttpResponse.builder().body("Hello World")
);