mural-async-app
v1.0.0
Published
Express wrapper for handling async middlewares, order middlewares, schema validator, and other stuff
Downloads
6
Readme
Express Wrapper.
Descirption
Express wrapper for handling async middlewares, order middlewares, schema validator, and other stuff. Or just create your own fn that recieves all the middlewares, do some magic with them and pass it as a converter. ( See Converter Docs )
Installation
npm i --save async-app
Usage
import { createApp } from '../async-app';
type User: string;
interface Entities extends BaseEntities {
user: User;
}
const app = createApp<Entities>();
app.get(
'/some-endpoint',
'Description of the endpoint',
`This is a generic description of the endpoint
where u can specified all the things you want`,
authenticated(),
req => getSomeEndpoint(req.something),
200,
);