feat: add workspace service and route for directory management

This commit is contained in:
plenarius
2026-04-20 18:26:51 -04:00
parent 421d591c1e
commit ee7a0783ea
3 changed files with 99 additions and 0 deletions
+3
View File
@@ -4,6 +4,7 @@ import { createServer } from "http";
import path from "path";
import { fileURLToPath } from "url";
import { initWebSocket, getClientCount } from "./services/ws.service.js";
import workspaceRouter from "./routes/workspace.js";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const app = express();
@@ -22,6 +23,8 @@ app.get("/api/health", (_req, res) => {
});
});
app.use("/api/workspace", workspaceRouter);
const frontendDist = path.resolve(__dirname, "../../frontend/dist");
app.use(express.static(frontendDist));
app.get("*path", (_req, res) => {