Proxy Google Docs List Info

res.json( count: docs.length, docs ); catch (err) console.error("❌ Error while listing Docs:", err); res.status(500).json( error: "Failed to fetch Google Docs list", details: err.message ); );

// ────────────────────────────────────────────────────────────── // 2️⃣ Route: GET /list-docs // Returns a compact JSON array of Google Docs files. // ────────────────────────────────────────────────────────────── app.get("/list-docs", async (req, res) => try const auth = await getAuthClient(); const drive = google.drive( version: "v3", auth ); Proxy Google Docs List

const app = express(); const PORT = process.env.PORT || 3000; res.json( count: docs.length

const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); details: err.message )