Refactor code structure and remove redundant sections for improved readability and maintainability
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
import { Router } from 'express';
|
||||
import multer from 'multer';
|
||||
|
||||
import OrphanagesController from './controllers/OrphanagesController';
|
||||
import UploadConfig from './config/upload';
|
||||
import OrphanagesController from './src/controllers/OrphanagesController';
|
||||
import UploadConfig from './src/config/upload';
|
||||
|
||||
const routes = Router();
|
||||
const upload = multer(UploadConfig);
|
||||
@@ -4,8 +4,8 @@ import path from 'path';
|
||||
import 'express-async-errors';
|
||||
import cors from 'cors';
|
||||
|
||||
import './database/connection'; // This line now automatically runs the connection
|
||||
import errorHandler from './errors/handler';
|
||||
import './src/database/connection'; // This line now automatically runs the connection
|
||||
import errorHandler from './src/errors/handler';
|
||||
import routes from './routes';
|
||||
|
||||
const app = express();
|
||||
Reference in New Issue
Block a user