33 */
44
55const compression = require ( "compression" ) ,
6- express = require ( "express" ) ,
7- hotRouter = require ( "hot-router" ) ,
6+ Express = require ( "express" ) ,
7+ HotRouter = require ( "hot-router" ) ,
88 Log = require ( "@roncli/node-application-insights-logger" ) ,
99 path = require ( "path" ) ,
1010 util = require ( "util" ) ;
@@ -39,7 +39,7 @@ class Index {
3939 }
4040
4141 // Setup express app.
42- const app = express ( ) ;
42+ const app = Express ( ) ;
4343
4444 // Remove powered by.
4545 app . disable ( "x-powered-by" ) ;
@@ -51,7 +51,7 @@ class Index {
5151 app . enable ( "trust proxy" ) ;
5252
5353 // Setup hot-router.
54- const router = new hotRouter . Router ( ) ;
54+ const router = new HotRouter . Router ( ) ;
5555 router . on ( "error" , ( data ) => {
5656 Log . error ( data . message , { err : data . err , req : data . req } ) ;
5757 } ) ;
@@ -61,7 +61,7 @@ class Index {
6161 Log . critical ( "Could not set up routes." , { err} ) ;
6262 }
6363
64- app . use ( ( /** @type {HttpErrors.HttpError } */ err , /** @type {express .Request } */ req , /** @type {express .Response } */ res , /** @type {express .NextFunction } */ next ) => {
64+ app . use ( ( /** @type {HttpErrors.HttpError } */ err , /** @type {Express .Request } */ req , /** @type {Express .Response } */ res , /** @type {Express .NextFunction } */ next ) => {
6565 router . error ( err , req , res , next ) ;
6666 } ) ;
6767
0 commit comments