Router
Key Features of the Router:
Example Router Code:
export class Router extends Soap.BasicRouter<Container, Config> {
public async configure(container: Container, config: Config) {
// Initialization and middleware setup...
// Example of adding a route to the router:
const customerController =
container.get<CustomerController>(CustomerController.Token);
// Mounting the route with associated controller method:
this.mount(
GetCustomerDetailsRoute.create(
customerController.getCustomerDetails,
config
)
);
}
}Last updated