Implement an OpenAI-compatible API proxy and user interface
Adds an API server with proxy routes for OpenAI and Anthropic clients, along with a frontend portal to interact with the API. Replit-Commit-Author: Agent Replit-Commit-Session-Id: dcd090ca-935a-42ae-8db4-503e1bbe165a Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 61b72c06-3c4d-47af-a97e-9d527892d9c5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/40608c50-a053-47e8-aa03-1bdcc1a2698b/dcd090ca-935a-42ae-8db4-503e1bbe165a/ZBSB1hW Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -2,6 +2,7 @@ import express, { type Express } from "express";
|
||||
import cors from "cors";
|
||||
import pinoHttp from "pino-http";
|
||||
import router from "./routes";
|
||||
import proxyRouter from "./routes/proxy";
|
||||
import { logger } from "./lib/logger";
|
||||
|
||||
const app: Express = express();
|
||||
@@ -26,9 +27,10 @@ app.use(
|
||||
}),
|
||||
);
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
app.use(express.json({ limit: "50mb" }));
|
||||
app.use(express.urlencoded({ extended: true, limit: "50mb" }));
|
||||
|
||||
app.use("/api", router);
|
||||
app.use("/v1", proxyRouter);
|
||||
|
||||
export default app;
|
||||
|
||||
Reference in New Issue
Block a user