fix git
This commit is contained in:
16
storage_server/src/app.module.ts
Normal file
16
storage_server/src/app.module.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ServeStaticModule } from '@nestjs/serve-static';
|
||||
import { join } from 'path';
|
||||
|
||||
// Resolve the storage directory (default to ../storage relative to the compiled or source path)
|
||||
const storageDir = process.env.STORAGE_DIR || join(__dirname, '..', '..', 'storage');
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
ServeStaticModule.forRoot({
|
||||
rootPath: storageDir,
|
||||
serveRoot: '/',
|
||||
}),
|
||||
],
|
||||
})
|
||||
export class AppModule { }
|
||||
Reference in New Issue
Block a user