Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ const apiProxyV2 = createProxyMiddleware({
target: "http://localhost:3004",
});

// TODO: this needs auth middleware before it hits prod
// also need to handle websocket upgrades at some point
const app = connect();
app.use("/", apiProxyV1);

app.use("/v2", apiProxyV2);
app.use("/", apiProxyV1); // catch-all has to go last or v2 never matches

http.createServer(app).listen(3002);
http.createServer(app).listen(3002, () => {
console.log("proxy listening on 3002");
});