Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- package.json +3 -0
- server.js +11 -0
package.json
CHANGED
|
@@ -15,5 +15,8 @@
|
|
| 15 |
"express-rate-limit": "^8.2.1",
|
| 16 |
"firebase-admin": "^13.7.0",
|
| 17 |
"pm2": "^6.0.14"
|
|
|
|
|
|
|
|
|
|
| 18 |
}
|
| 19 |
}
|
|
|
|
| 15 |
"express-rate-limit": "^8.2.1",
|
| 16 |
"firebase-admin": "^13.7.0",
|
| 17 |
"pm2": "^6.0.14"
|
| 18 |
+
},
|
| 19 |
+
"engines": {
|
| 20 |
+
"node": ">=20.0.0"
|
| 21 |
}
|
| 22 |
}
|
server.js
CHANGED
|
@@ -12,6 +12,17 @@ import * as cheerio from "cheerio";
|
|
| 12 |
|
| 13 |
dotenv.config();
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
/**
|
| 16 |
* 🚀 HIGH SCALING ARCHITECTURE: 10,000+ USER UPGRADE
|
| 17 |
* 1. Vertical Scaling: Node.js Cluster spans multiple processes per CPU core.
|
|
|
|
| 12 |
|
| 13 |
dotenv.config();
|
| 14 |
|
| 15 |
+
// Fix for Node 18/undici "File is not defined" error
|
| 16 |
+
if (typeof global.File === "undefined") {
|
| 17 |
+
global.File = class File extends Blob {
|
| 18 |
+
constructor(parts, filename, options = {}) {
|
| 19 |
+
super(parts, options);
|
| 20 |
+
this.name = filename;
|
| 21 |
+
this.lastModified = options.lastModified || Date.now();
|
| 22 |
+
}
|
| 23 |
+
};
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
/**
|
| 27 |
* 🚀 HIGH SCALING ARCHITECTURE: 10,000+ USER UPGRADE
|
| 28 |
* 1. Vertical Scaling: Node.js Cluster spans multiple processes per CPU core.
|