feat: upload module (#486)
* feat: wip upload module * feat: local storage and serve local images * feat: protect against injections * feat: server local and s3 files * fix: use storage location when serving local files * feat: cross field env validation
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { AppModule } from './app.module';
|
||||
import { graphqlUploadExpress } from 'graphql-upload';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule, { cors: true });
|
||||
@ -8,6 +9,9 @@ async function bootstrap() {
|
||||
// Apply validation pipes globally
|
||||
app.useGlobalPipes(new ValidationPipe());
|
||||
|
||||
// Graphql file upload
|
||||
app.use(graphqlUploadExpress());
|
||||
|
||||
await app.listen(3000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user