Skip to content
Closed
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
6 changes: 4 additions & 2 deletions packages/devtools/src/devtoolsStaticServer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import cors from "cors";
import express, { type Router } from "express";
import path from "node:path";
import { fileURLToPath } from "node:url";

/**
* Serve the built devtools React app
Expand All @@ -24,6 +24,8 @@ export const devtoolsStaticServer = async (): Promise<Router> => {

router.use(cors());
router.use(express.static(distDir));
// this will serve the assets folder from the ChatGPT app folder in the dev mode
router.use("/assets", express.static("assets"));
router.get("/", (_req, res, next) => {
const indexHtmlPath = path.join(distDir, "index.html");
res.sendFile(indexHtmlPath, (error) => {
Expand Down
Loading