Use useStaticAssets instead of @nestjs/serve-static

`serve-static` does not work with `createTestingModule` and is not recommended when "just" serving a few images.

See https://github.com/nestjs/serve-static/issues/240

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-10-24 11:32:23 +02:00
parent bd1a6e528e
commit 15db6a9b2a
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
4 changed files with 6 additions and 14 deletions

View file

@ -22,11 +22,6 @@ import { UsersModule } from './users/users.module';
autoLoadEntities: true,
synchronize: true,
}),
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..'),
// TODO: Get uploads directory from config
renderPath: 'uploads',
}),
NotesModule,
UsersModule,
RevisionsModule,