forked from Yara724/api
Merge pull request 'ServeRoot fixing on WORKDIR' (#136) from s.yahyaee/yara724-api:main into main
Reviewed-on: Yara724/api#136
This commit is contained in:
@@ -32,7 +32,11 @@ import { AppConfigModule } from "./core/config/config.module";
|
|||||||
DatabaseModule,
|
DatabaseModule,
|
||||||
CronModule,
|
CronModule,
|
||||||
ServeStaticModule.forRoot({
|
ServeStaticModule.forRoot({
|
||||||
rootPath: join(__dirname, "..", "files"),
|
// process.cwd() is always the project/container root (/app in Docker),
|
||||||
|
// so the volume-mounted /app/files is resolved correctly regardless of
|
||||||
|
// where the compiled dist files live (__dirname would resolve to
|
||||||
|
// /app/dist/src because TypeScript preserves the src/ prefix in outDir).
|
||||||
|
rootPath: join(process.cwd(), "files"),
|
||||||
serveRoot: "/files",
|
serveRoot: "/files",
|
||||||
}),
|
}),
|
||||||
UsersModule,
|
UsersModule,
|
||||||
|
|||||||
Reference in New Issue
Block a user