style: format api-server index with consistent indentation

This commit is contained in:
2026-01-23 09:52:22 -05:00
parent da23ca1c3f
commit 6e0487f8f3

View File

@@ -1,30 +1,30 @@
import { statusRoute } from "./routes/status";
import { kijijiRoute } from "./routes/kijiji";
import { facebookRoute } from "./routes/facebook";
import { ebayRoute } from "./routes/ebay";
import { facebookRoute } from "./routes/facebook";
import { kijijiRoute } from "./routes/kijiji";
import { statusRoute } from "./routes/status";
const PORT = process.env.PORT || 4005;
const server = Bun.serve({
port: PORT as number | string,
idleTimeout: 0,
routes: {
// Health check endpoint
"/api/status": statusRoute,
port: PORT as number | string,
idleTimeout: 0,
routes: {
// Health check endpoint
"/api/status": statusRoute,
// Marketplace search endpoints
"/api/kijiji": kijijiRoute,
"/api/facebook": facebookRoute,
"/api/ebay": ebayRoute,
// Marketplace search endpoints
"/api/kijiji": kijijiRoute,
"/api/facebook": facebookRoute,
"/api/ebay": ebayRoute,
// Fallback for unmatched /api routes
"/api/*": Response.json({ message: "Not found" }, { status: 404 }),
},
// Fallback for unmatched /api routes
"/api/*": Response.json({ message: "Not found" }, { status: 404 }),
},
// Fallback for all other routes
fetch(req: Request) {
return new Response("Not Found", { status: 404 });
},
// Fallback for all other routes
fetch(_req: Request) {
return new Response("Not Found", { status: 404 });
},
});
console.log(`API Server running on ${server.hostname}:${server.port}`);