INNER CODE UNIT · TypeScript
bootstrap
tkosminov/nestjs-example · src/main.ts:19
async function bootstrap() {
const server = express();
const app = await NestFactory.create(AppModule, new ExpressAdapter(server), {
bodyParser: true,
});
const config = app.get(ConfigService);
const redis = app.get(RedisService);
const jwt = app.get(JwtService);
const graphql_reload = app.get(GraphQLReloaderService);
graphql_reload.applyApp(app);
app.use(graphqlUploadExpress({ maxFileSize: config.getOrThrow<number>('APP_BODY_PARAMETER_LIMIT'), maxFiles: 1 }));
app.use(json({ limit: config.getOrThrow<string>('APP_BODY_LIMIT') }));
app.use(
urlencoded({