Fixed static file location for production use
This commit is contained in:
parent
34ab0021d8
commit
6f245534f0
@ -6,6 +6,7 @@ import { JWTAuthGuard, Role, RoleGuard } from './authguards';
|
||||
import AuthModule from './modules/auth';
|
||||
import { ServeStaticModule } from '@nestjs/serve-static';
|
||||
import { join } from 'path';
|
||||
import { cwd } from 'process';
|
||||
|
||||
declare const PROD: boolean | undefined;
|
||||
|
||||
@ -35,7 +36,7 @@ class TestController {
|
||||
ServeStaticModule.forRoot({
|
||||
rootPath:
|
||||
typeof PROD !== 'undefined' && PROD
|
||||
? join(__dirname, 'frontend')
|
||||
? join(cwd(), 'frontend')
|
||||
: join(__dirname, '..', '..', 'frontend', 'dist'),
|
||||
exclude: ['/api*']
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user