Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update index.ts

Nicolasd3856371c975
diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts
index 1cdda34ee..e2b2d31de 100644
--- a/apps/api/src/index.ts
+++ b/apps/api/src/index.ts
@@ -20,6 +20,7 @@ import { crawlStatusWSController } from "./controllers/v1/crawl-status-ws";
import { ErrorResponse, ResponseWithSentry } from "./controllers/v1/types";
import { ZodError } from "zod";
import { v4 as uuidv4 } from "uuid";
+import dns from 'node:dns';
const { createBullBoard } = require("@bull-board/api");
const { BullAdapter } = require("@bull-board/api/bullAdapter");
@@ -28,13 +29,14 @@ const { ExpressAdapter } = require("@bull-board/express");
const numCPUs = process.env.ENV === "local" ? 2 : os.cpus().length;
Logger.info(`Number of CPUs: ${numCPUs} available`);
-const cacheable = new CacheableLookup({
- // this is important to avoid querying local hostnames see https://github.com/szmarczak/cacheable-lookup readme
- lookup:false
-});
+// Disable CacheableLookup for VPC fire-engine-api
+const cacheable = new CacheableLookup()
+
+// Install cacheable lookup for all other requests
cacheable.install(http.globalAgent);
-cacheable.install(https.globalAgent)
+cacheable.install(https.globalAgent);
+
const ws = expressWs(express());
const app = ws.app;