Route
export class GetCustomerDetailsRoute {
static create(handler: RouteHandler, config: Config) {
return new GetCustomerDetailsRoute(
'shop/customers/:id',
handler,
// additional options
{
io: new GetCustomerDetailsRouteIO(),
auth: {
authenticator: 'passport',
type: 'jwt',
secretOrKey: config.secret,
},
validation: {
validator: 'ajv',
schema: GetCustomerDetailsSchema
},
cors: {
origin: '*',
},
throttler: {
maxRequestsPerSecond: 1
},
limiter: {
maxRequests: 1
},
middlewares: [SelfDataAccessMiddleware]
}
);
}
}Creating new route
Using CLI Command with options
Using Interactive Form
Using JSON Configuration
File Structure
Last updated