|
1 | 1 | // Register module aliases at the start of the application |
2 | 2 | import 'module-alias/register'; |
3 | | -import { NestFactory } from '@nestjs/core'; |
4 | | -import { ExpressAdapter } from '@nestjs/platform-express'; |
5 | | -import { AppModule } from './app.module'; |
6 | | -import express, { Request, Response } from 'express'; |
7 | | -import { Logger } from '@nestjs/common'; |
8 | 3 | import * as path from 'path'; |
9 | | - |
10 | | -// Register path aliases |
11 | 4 | import moduleAlias from 'module-alias'; |
| 5 | + |
| 6 | +// Set up module aliases with more robust path resolution |
12 | 7 | moduleAlias.addAliases({ |
13 | 8 | '@': path.join(__dirname, '../'), |
14 | 9 | 'src': path.join(__dirname, '../') |
15 | 10 | }); |
16 | 11 |
|
| 12 | +// Add additional path resolution for specific directories |
| 13 | +moduleAlias.addPath(path.join(__dirname, '../repositories')); |
| 14 | +moduleAlias.addPath(path.join(__dirname, '../')); |
| 15 | + |
| 16 | +import { NestFactory } from '@nestjs/core'; |
| 17 | +import { ExpressAdapter } from '@nestjs/platform-express'; |
| 18 | +import { AppModule } from './app.module'; |
| 19 | +import express, { Request, Response } from 'express'; |
| 20 | +import { Logger } from '@nestjs/common'; |
| 21 | + |
17 | 22 | const server = express(); |
18 | 23 |
|
19 | 24 | async function bootstrap() { |
|
0 commit comments