Skip to content

basalt / express/src / registerRoutes

Function: registerRoutes() ​

> registerRoutes(app, routes, container?, enrichers?, guards?, onError?): void

Defined in: express/src/index.ts:361

Mounts Basalt routes on an Express app (usable without the plugin).

Parameters ​

app ​

Express

routes ​

BasaltRoute[]

container? ​

Container

enrichers? ​

RequestEnricher[] = []

guards? ​

RouteGuard[] = []

onError? ​

HttpErrorReporter

Returns ​

void

Released under the MIT License.