[added] - new routes
This commit is contained in:
@@ -4,9 +4,9 @@ import config from "./config/config";
|
||||
import morgan from "./config/morgan";
|
||||
import path from 'path';
|
||||
import logger from './config/logger';
|
||||
import ApiError from './utils/helper/ApiError';
|
||||
import error from './middleware/error';
|
||||
import routes from './routes';
|
||||
import ApiError from './utils/helper/ApiError';
|
||||
|
||||
class App {
|
||||
private app: Application;
|
||||
@@ -38,8 +38,12 @@ class App {
|
||||
}
|
||||
|
||||
private initializeErrorHandling(): void {
|
||||
this.app.use(error.errorConverter);
|
||||
this.app.use(error.errorHandler);
|
||||
this.app.use(error.errorConverter);
|
||||
this.app.use((req, res, next) => {
|
||||
console.log('Request passed through middleware.');
|
||||
next();
|
||||
});
|
||||
}
|
||||
|
||||
public listen(port: number): ReturnType<typeof this.app.listen> {
|
||||
|
||||
Reference in New Issue
Block a user