Skip to content

Commit dbb4496

Browse files
committed
Switch order of api/root router initialisation
1 parent 1ce8e8c commit dbb4496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ServerModule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ class ServerModule extends AbstractModule {
5959
* Starts the HTTP server
6060
*/
6161
async start () {
62-
// Initialise the root router
62+
// Initialise the routers
63+
this.api.init()
6364
this.root.init()
6465
// Initialise the API router
6566
this.api.expressRouter.get('/', ServerUtils.mapHandler(this.api).bind(this))
6667
this.api.addMiddleware(
6768
ServerUtils.debugRequestTime
6869
)
69-
this.api.init()
7070
// add not-found handlers
7171
this.api.expressRouter.use(ServerUtils.apiNotFoundHandler.bind(this))
7272
this.root.expressRouter.use(ServerUtils.rootNotFoundHandler.bind(this))

0 commit comments

Comments
 (0)