awacke1 commited on
Commit
1f784ac
·
verified ·
1 Parent(s): 117bc3a

Update index.mjs

Browse files
Files changed (1) hide show
  1. index.mjs +5 -0
index.mjs CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  import express from "express";
2
  import 'dotenv/config.js';
3
  import { createServer } from "http";
 
1
+ // At the top of your index.mjs or wherever you're planning to use fetch
2
+ import fetch from 'node-fetch';
3
+ if (!globalThis.fetch) {
4
+ globalThis.fetch = fetch;
5
+ }
6
  import express from "express";
7
  import 'dotenv/config.js';
8
  import { createServer } from "http";