The path to match.
Auxiliary method that matches a POST request for the given path.
The path to match.
Routes a handler for the given method and path.
import { pipe } from 'fp-ts/function';
import { apigateway as apigw } from 'lambda-router-ts';
const helloWorld = async (req: MatchedRequest<apigw.Request>) =>
some({ statusCode: 200, body: `Hello ${req.match.name}!`});
route({
method: 'GET',
path: '/api/hello/:name'
})(helloWorld);
get('/api/hello/:name')(helloWorld);
pipe(helloWorld, get('/api/hello/:name'));
Generated using TypeDoc
Auxiliary method that matches a GET request for the given path.