Skip to content

Instantly share code, notes, and snippets.

@jacobdo2
Created June 8, 2020 09:24
Show Gist options
  • Save jacobdo2/df3fd3796f35f4760753c9f313600991 to your computer and use it in GitHub Desktop.
Save jacobdo2/df3fd3796f35f4760753c9f313600991 to your computer and use it in GitHub Desktop.
Adding node-fetch to main.ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
global['fetch'] = require('node-fetch');
async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment